[gtk/wip/chergert/quartz4u: 63/116] macos: remove some duplicate configure events



commit 422c2c26c246f00a28b362abb53e4cf6cf85715e
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 20 16:38:21 2020 -0700

    macos: remove some duplicate configure events

 gdk/macos/GdkMacosWindow.c  |  8 --------
 gdk/macos/gdkmacossurface.c | 10 +---------
 2 files changed, 1 insertion(+), 17 deletions(-)
---
diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c
index cd32254874..1d351214d7 100644
--- a/gdk/macos/GdkMacosWindow.c
+++ b/gdk/macos/GdkMacosWindow.c
@@ -192,10 +192,7 @@
 -(void)windowDidMove:(NSNotification *)aNotification
 {
   GdkSurface *surface = GDK_SURFACE (gdk_surface);
-  GdkDisplay *display = gdk_surface_get_display (surface);
   gboolean maximized = (surface->state & GDK_SURFACE_STATE_MAXIMIZED) != 0;
-  GdkEvent *event;
-  GList *node;
 
   /* In case the window is changed when maximized remove the maximized state */
   if (maximized && !inMaximizeTransition && !NSEqualRects (lastMaximizedFrame, [self frame]))
@@ -203,11 +200,6 @@
 
   _gdk_macos_surface_update_position (gdk_surface);
 
-  event = gdk_configure_event_new (surface, surface->width, surface->height);
-  node = _gdk_event_queue_append (GDK_DISPLAY (display), event);
-  _gdk_windowing_got_event (display, node, event,
-                            _gdk_display_get_next_serial (display));
-
   [self checkSendEnterNotify];
 }
 
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index f1063cdf13..89419b4029 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -798,9 +798,7 @@ _gdk_macos_surface_move_resize (GdkMacosSurface *self,
   GdkDisplay *display;
   NSRect content_rect;
   NSRect frame_rect;
-  GdkEvent *event;
   gboolean size_changed;
-  GList *node;
 
   g_return_if_fail (GDK_IS_MACOS_SURFACE (self));
 
@@ -845,14 +843,8 @@ _gdk_macos_surface_move_resize (GdkMacosSurface *self,
   [self->window setFrame:frame_rect display:YES];
 
   if (size_changed)
-    {
-      gdk_surface_invalidate_rect (surface, NULL);
+    gdk_surface_invalidate_rect (surface, NULL);
 
-      event = gdk_configure_event_new (surface, width, height);
-      node = _gdk_event_queue_append (display, event);
-      _gdk_windowing_got_event (display, node, event,
-                                _gdk_display_get_next_serial (display));
-    }
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]