diff options
| author | Pablo Barciela <[email protected]> | 2018-05-22 20:06:03 +0200 |
|---|---|---|
| committer | Pablo Barciela <[email protected]> | 2018-05-23 16:16:00 +0200 |
| commit | 6939d4119566fdac2dc2cf0dfd6e3d77f8cf8e1c (patch) | |
| tree | 418468b7662f201f73b12c3ef85403144f54b527 | |
| parent | d604722f7b3cfdb6b18061281b1363845e452c15 (diff) | |
| download | pluma-6939d4119566fdac2dc2cf0dfd6e3d77f8cf8e1c.tar.bz2 pluma-6939d4119566fdac2dc2cf0dfd6e3d77f8cf8e1c.tar.xz | |
pluma-print-preview: Fix weird behavior with mouse buttons
Fixes https://github.com/mate-desktop/pluma/issues/321
| -rw-r--r-- | pluma/pluma-print-preview.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pluma/pluma-print-preview.c b/pluma/pluma-print-preview.c index 22a98bae..dead7490 100644 --- a/pluma/pluma-print-preview.c +++ b/pluma/pluma-print-preview.c @@ -538,6 +538,14 @@ close_button_clicked (GtkWidget *button, gtk_widget_destroy (GTK_WIDGET (preview)); } +static gboolean +ignore_mouse_buttons (GtkWidget *widget, + GdkEventKey *event, + PlumaPrintPreview *preview) +{ + return TRUE; +} + static void create_bar (PlumaPrintPreview *preview) { @@ -705,6 +713,11 @@ create_bar (PlumaPrintPreview *preview) G_CALLBACK (close_button_clicked), preview); gtk_widget_show (GTK_WIDGET (i)); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), i, -1); + + g_signal_connect (GTK_TOOLBAR (toolbar), + "button-press-event", + G_CALLBACK (ignore_mouse_buttons), + preview); } static gint @@ -972,6 +985,11 @@ create_preview_layout (PlumaPrintPreview *preview) G_CALLBACK (preview_layout_query_tooltip), preview); + g_signal_connect (priv->layout, + "button-press-event", + G_CALLBACK (ignore_mouse_buttons), + preview); + priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window), GTK_POLICY_AUTOMATIC, |
