summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-07-15 01:07:07 -0400
committerMatthias Clasen <mclasen@redhat.com>2018-07-15 07:42:09 -0400
commitd0e28abbd4b9406636e4ab82ea1c6949beb4b724 (patch)
treecb28fbc6c72017645b7e774eeaaaf813c5cbde46
parent343e3f3982238de88b5ad80fbb08e88e5af4dbea (diff)
downloadgtk+-d0e28abbd4b9406636e4ab82ea1c6949beb4b724.tar.gz
x11: Stop sending configure events
No longer needed.
-rw-r--r--gdk/x11/gdkdisplay-x11.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index d791d420cb..106c75c45d 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -960,10 +960,12 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
return_val = FALSE;
else
{
- event->any.type = GDK_CONFIGURE;
- event->any.surface = surface;
- event->configure.width = (xevent->xconfigure.width + surface_impl->surface_scale - 1) / surface_impl->surface_scale;
- event->configure.height = (xevent->xconfigure.height + surface_impl->surface_scale - 1) / surface_impl->surface_scale;
+ int x, y, width, height;
+
+ x = 0;
+ y = 0;
+ width = (xevent->xconfigure.width + surface_impl->surface_scale - 1) / surface_impl->surface_scale;
+ height = (xevent->xconfigure.height + surface_impl->surface_scale - 1) / surface_impl->surface_scale;
if (!xevent->xconfigure.send_event &&
!xevent->xconfigure.override_redirect &&
@@ -981,31 +983,31 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
&tx, &ty,
&child_window))
{
- event->configure.x = tx / surface_impl->surface_scale;
- event->configure.y = ty / surface_impl->surface_scale;
+ x = tx / surface_impl->surface_scale;
+ y = ty / surface_impl->surface_scale;
}
gdk_x11_display_error_trap_pop_ignored (display);
}
else
{
- event->configure.x = xevent->xconfigure.x / surface_impl->surface_scale;
- event->configure.y = xevent->xconfigure.y / surface_impl->surface_scale;
+ x = xevent->xconfigure.x / surface_impl->surface_scale;
+ y = xevent->xconfigure.y / surface_impl->surface_scale;
}
if (!is_substructure)
{
- surface->x = event->configure.x;
- surface->y = event->configure.y;
+ surface->x = x;
+ surface->y = y;
if (surface_impl->unscaled_width != xevent->xconfigure.width ||
surface_impl->unscaled_height != xevent->xconfigure.height)
{
surface_impl->unscaled_width = xevent->xconfigure.width;
surface_impl->unscaled_height = xevent->xconfigure.height;
- surface->width = event->configure.width;
- surface->height = event->configure.height;
-
+ g_object_freeze_notify (G_OBJECT (surface));
+ gdk_surface_set_size (surface, width, height);
_gdk_surface_update_size (surface);
_gdk_x11_surface_update_size (surface_impl);
+ g_object_thaw_notify (G_OBJECT (surface));
}
if (surface->resize_count >= 1)
@@ -1016,6 +1018,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
_gdk_x11_moveresize_configure_done (display, surface);
}
}
+
+ return_val = FALSE;
}
break;