[evolution] Shift+Click on switcher button to open a new window
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Shift+Click on switcher button to open a new window
- Date: Fri, 18 May 2018 06:47:10 +0000 (UTC)
commit cc783f32f7a9c8da027d0368f4a4b929ce9e9b85
Author: Milan Crha <mcrha redhat com>
Date: Fri May 18 08:47:52 2018 +0200
Shift+Click on switcher button to open a new window
Both middle-click and Shift+left-click open a new window when
pressed on the switcher button. The Shift+left-click had been
added for consistency with other applications.
Requested downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=1308665
src/shell/e-shell-switcher.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/shell/e-shell-switcher.c b/src/shell/e-shell-switcher.c
index db1e63a..9f0c8eb 100644
--- a/src/shell/e-shell-switcher.c
+++ b/src/shell/e-shell-switcher.c
@@ -617,13 +617,17 @@ tool_item_button_cb (GtkWidget *internal_widget,
GdkEvent *button_event,
GtkAction *action)
{
+ guint32 my_mods = GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK |
+ GDK_SUPER_MASK | GDK_HYPER_MASK | GDK_META_MASK;
+ GdkModifierType event_state = 0;
guint event_button = 0;
g_return_val_if_fail (GTK_IS_ACTION (action), FALSE);
gdk_event_get_button (button_event, &event_button);
+ gdk_event_get_state (button_event, &event_state);
- if (event_button == 2) {
+ if (event_button == 2 || (event_button == 1 && (event_state & my_mods) == GDK_SHIFT_MASK)) {
gtk_action_activate (action);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]