diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-07-15 19:52:28 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-07-15 20:23:45 -0400 |
commit | 7a1073c3ae89e4cdf35d95afec564d48f776774f (patch) | |
tree | 2c3c4eb8f3d942362297923c48e80807211e5e5a /gdk/x11 | |
parent | e2fd33f78a5bcd461139a32957abfeaa45fa3d2e (diff) | |
download | gtk+-7a1073c3ae89e4cdf35d95afec564d48f776774f.tar.gz |
Revert "gdk: Drop configure events"
This reverts commit a8926c9d873ce968353a2eb1d3930c4f1ac79c94.
Diffstat (limited to 'gdk/x11')
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 72ead44bbb..3dc613fc82 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -958,12 +958,11 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator, return_val = FALSE; else { - int x, y, width, height; + 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; - 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 && !GDK_SURFACE_DESTROYED (surface)) @@ -980,34 +979,31 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator, &tx, &ty, &child_window)) { - x = tx / surface_impl->surface_scale; - y = ty / surface_impl->surface_scale; + event->configure.x = tx / surface_impl->surface_scale; + event->configure.y = ty / surface_impl->surface_scale; } gdk_x11_display_error_trap_pop_ignored (display); } else { - x = xevent->xconfigure.x / surface_impl->surface_scale; - y = xevent->xconfigure.y / surface_impl->surface_scale; + event->configure.x = xevent->xconfigure.x / surface_impl->surface_scale; + event->configure.y = xevent->xconfigure.y / surface_impl->surface_scale; } - if (!is_substructure) { - surface->x = x; - surface->y = y; + surface->x = event->configure.x; + surface->y = event->configure.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 = width; - surface->height = height; + surface->width = event->configure.width; + surface->height = event->configure.height; _gdk_surface_update_size (surface); _gdk_x11_surface_update_size (surface_impl); - - g_signal_emit_by_name (surface, "size-changed", width, height); } if (surface->resize_count >= 1) @@ -1016,10 +1012,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator, if (surface->resize_count == 0) _gdk_x11_moveresize_configure_done (display, surface); - } + } } - - return_val = FALSE; } break; |