diff options
Diffstat (limited to 'gdk/x11/gdkdisplay-x11.c')
-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; |