emacs-diffs
[Top][All Lists]
Advanced

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

master eb351e3795: Minor changes to xsync support


From: Po Lu
Subject: master eb351e3795: Minor changes to xsync support
Date: Sat, 5 Feb 2022 19:40:49 -0500 (EST)

branch: master
commit eb351e3795bb89fc5bdb4e6a1db0b53563a2ebaf
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Minor changes to xsync support
    
    * src/xfns.c (append_wm_protocols): Don't append
    _NET_WM_SYNC_REQUEST unless the display supports our version of
    XSync.
    
    * src/xterm.c (handle_one_xevent): Don't handle
    _NET_WM_SYNC_REQUEST unless the display supports that.
    (x_free_frame_resources): Test basic counter against None.
---
 src/xfns.c  | 2 +-
 src/xterm.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/xfns.c b/src/xfns.c
index bfb61c1205..baa643bde0 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2402,7 +2402,7 @@ append_wm_protocols (struct x_display_info *dpyinfo,
   if (!found_wm_ping)
     protos[num_protos++] = dpyinfo->Xatom_net_wm_ping;
 #if !defined HAVE_GTK3 && defined HAVE_XSYNC
-  if (!found_wm_sync_request)
+  if (!found_wm_sync_request && dpyinfo->xsync_supported_p)
     protos[num_protos++] = dpyinfo->Xatom_net_wm_sync_request;
 #endif
 
diff --git a/src/xterm.c b/src/xterm.c
index 4b4eae53be..0d0a08d078 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9103,7 +9103,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
 #if defined HAVE_XSYNC && !defined HAVE_GTK3
            if (event->xclient.data.l[0] == dpyinfo->Xatom_net_wm_sync_request
-               && event->xclient.format == 32)
+               && event->xclient.format == 32
+               && dpyinfo->xsync_supported_p)
              {
                struct frame *f
                  = x_top_window_to_frame (dpyinfo,
@@ -14784,7 +14785,7 @@ x_free_frame_resources (struct frame *f)
 #endif /* !USE_X_TOOLKIT */
 
 #ifdef HAVE_XSYNC
-      if (FRAME_X_BASIC_COUNTER (f))
+      if (FRAME_X_BASIC_COUNTER (f) != None)
        XSyncDestroyCounter (FRAME_X_DISPLAY (f),
                             FRAME_X_BASIC_COUNTER (f));
 #endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]