]> git.eshelyaron.com Git - emacs.git/commitdiff
Reenable frame sync for child frames after they're unparented
authorPo Lu <luangruo@yahoo.com>
Sat, 14 May 2022 02:11:22 +0000 (10:11 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 14 May 2022 02:12:21 +0000 (10:12 +0800)
* src/xfns.c (x_set_parent_frame, Fx_create_frame): Use correct
boolean constants.
* src/xterm.c (handle_one_xevent): Enable frame synchronization
upon receiving a sync request event.

src/xfns.c
src/xterm.c

index 7b5273e280a687bc5ee6bc07e86e2c208699f230..4ba7edcb98eb049394d9dd762b23df33b9eac258 100644 (file)
@@ -973,7 +973,7 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
       if (p)
        {
          window = gtk_widget_get_window (FRAME_GTK_OUTER_WIDGET (f));
-         gdk_x11_window_set_frame_sync_enabled (window, false);
+         gdk_x11_window_set_frame_sync_enabled (window, FALSE);
        }
 #endif
       unblock_input ();
@@ -4983,7 +4983,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
 #endif
 #ifdef HAVE_GTK3
       gwin = gtk_widget_get_window (FRAME_GTK_OUTER_WIDGET (f));
-      gdk_x11_window_set_frame_sync_enabled (gwin, false);
+      gdk_x11_window_set_frame_sync_enabled (gwin, FALSE);
 #endif
       unblock_input ();
     }
index 170f65d06f6e8144e35f814d21e04c3be38321f6..0bec87438ecf8b9af590916ae221d50349cd637b 100644 (file)
@@ -14765,17 +14765,21 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                    *finish = X_EVENT_DROP;
 #else
                    widget = FRAME_GTK_OUTER_WIDGET (f);
+                   window = gtk_widget_get_window (widget);
+                   eassert (window);
+
+                   /* This could be a (former) child frame for which
+                      frame synchronization was disabled.  Enable it
+                      now.  */
+                   gdk_x11_window_set_frame_sync_enabled (window, TRUE);
 
                    if (widget && !FRAME_X_OUTPUT (f)->xg_sync_end_pending_p)
                      {
-                       window = gtk_widget_get_window (widget);
-                       eassert (window);
                        frame_clock = gdk_window_get_frame_clock (window);
                        eassert (frame_clock);
 
                        gdk_frame_clock_request_phase (frame_clock,
                                                       GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT);
-
                        FRAME_X_OUTPUT (f)->xg_sync_end_pending_p = true;
                      }
 #endif