Skip to content

Commit

Permalink
Use gdk_event_triggers_context_menu ()
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Villenave committed Oct 27, 2021
1 parent 2c178fb commit 5e9de74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions applets/brightness/brightness-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,9 @@ gpm_applet_create_popup (GpmBrightnessApplet *applet)
gboolean
gpm_applet_popup_click_cb (GpmBrightnessApplet *applet, GdkEventButton *event)
{
/* react only to left mouse button */
if (event->button != 1) {
return FALSE;
}
return gpm_applet_popup_cb (applet);
if (gdk_event_triggers_context_menu ((GdkEvent *) event))
return gpm_applet_popup_cb (applet);
return FALSE;
}

/**
Expand Down
8 changes: 3 additions & 5 deletions applets/inhibit/inhibit-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,9 @@ gpm_applet_update_tooltip (GpmInhibitApplet *applet)
static gboolean
gpm_applet_click_cb (GpmInhibitApplet *applet, GdkEventButton *event)
{
/* react only to left mouse button */
if (event->button != 1) {
return FALSE;
}
return gpm_applet_switch_cb (applet);
if (gdk_event_triggers_context_menu ((GdkEvent *) event)
return gpm_applet_switch_cb (applet);
return FALSE;
}

/**
Expand Down

0 comments on commit 5e9de74

Please sign in to comment.