From: Po Lu Date: Sat, 14 May 2022 02:11:22 +0000 (+0800) Subject: Reenable frame sync for child frames after they're unparented X-Git-Tag: emacs-29.0.90~1910^2~713 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0bedf074a64db05bde6d67f58faef054362be258;p=emacs.git Reenable frame sync for child frames after they're unparented * 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. --- diff --git a/src/xfns.c b/src/xfns.c index 7b5273e280a..4ba7edcb98e 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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 (); } diff --git a/src/xterm.c b/src/xterm.c index 170f65d06f6..0bec87438ec 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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