summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-09-14 10:56:13 +0200
committerAlexander Larsson <alexl@redhat.com>2015-09-14 11:01:13 +0200
commitd5f1754981129094afbe5d9c1d57e41599fad410 (patch)
treef4284fa809bbc6b9902bdcbe013ede86ea7ab93e /gtk/gtktextview.c
parenteafedfbaf8e080a1e444f46cde082fb2734552f9 (diff)
downloadgtk+-d5f1754981129094afbe5d9c1d57e41599fad410.tar.gz
gtk: Stop setting GDK_EXPOSURE_MASK on random widgets
These days exposure happens only on the native windows (generally the toplevel window) and is propagated down recursively. The expose event is only useful for backwards compat, and in fact, for double buffered widgets we totally ignore the event (and non-double buffering breaks on wayland). So, by not setting the mask we avoid emitting these events and then later ignoring them. We still keep it on eventbox, fixed and layout as these are used in weird ways that want backwards compat.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r--gtk/gtktextview.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 697d63f53e..e9860d79e4 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4602,7 +4602,7 @@ gtk_text_view_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
- attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK;
+ attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
@@ -9814,7 +9814,6 @@ text_window_realize (GtkTextWindow *win,
attributes.width = win->allocation.width;
attributes.height = win->allocation.height;
attributes.event_mask = gtk_widget_get_events (win->widget)
- | GDK_EXPOSURE_MASK
| GDK_SCROLL_MASK
| GDK_SMOOTH_SCROLL_MASK
| GDK_KEY_PRESS_MASK