diff options
author | Havoc Pennington <hp@redhat.com> | 2002-04-15 22:14:06 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-04-15 22:14:06 +0000 |
commit | 2a71cab8c47cb1fa8730cf33a076888020631521 (patch) | |
tree | 66fee4af7fea878c8b30c55f49c699fa370ae939 | |
parent | 1ee119f3dc0e7c963828f37d3d7546da9bec05c0 (diff) | |
download | metacity-2a71cab8c47cb1fa8730cf33a076888020631521.tar.gz |
reply immediately for windows that don't support _NET_WM_PING
2002-04-15 Havoc Pennington <hp@redhat.com>
* src/display.c (meta_display_ping_window): reply immediately for
windows that don't support _NET_WM_PING
* src/window.c (update_protocols): check whether windows
support _NET_WM_PING
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/display.c | 8 | ||||
-rw-r--r-- | src/window.c | 8 | ||||
-rw-r--r-- | src/window.h | 3 |
4 files changed, 24 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2002-04-15 Havoc Pennington <hp@redhat.com> + + * src/display.c (meta_display_ping_window): reply immediately for + windows that don't support _NET_WM_PING + + * src/window.c (update_protocols): check whether windows + support _NET_WM_PING + 2002-04-13 Havoc Pennington <hp@pobox.com> * src/ui.c (get_cmap): same fix as libwnck, avoid using cmap diff --git a/src/display.c b/src/display.c index f8400d9a..f1a9c646 100644 --- a/src/display.c +++ b/src/display.c @@ -2450,6 +2450,14 @@ meta_display_ping_window (MetaDisplay *display, meta_warning ("Tried to ping a window with CurrentTime! Not allowed.\n"); return; } + + if (!window->net_wm_ping) + { + if (ping_reply_func) + (* ping_reply_func) (display, window->xwindow, user_data); + + return; + } ping_data = g_new (MetaPingData, 1); ping_data->display = display; diff --git a/src/window.c b/src/window.c index dc80b94b..dd516e95 100644 --- a/src/window.c +++ b/src/window.c @@ -3760,6 +3760,7 @@ update_protocols (MetaWindow *window) window->take_focus = FALSE; window->delete_window = FALSE; + window->net_wm_ping = FALSE; meta_error_trap_push (window->display); @@ -3775,14 +3776,17 @@ update_protocols (MetaWindow *window) window->take_focus = TRUE; else if (protocols[i] == window->display->atom_wm_delete_window) window->delete_window = TRUE; + else if (protocols[i] == window->display->atom_net_wm_ping) + window->net_wm_ping = TRUE; ++i; } meta_XFree (protocols); } - meta_verbose ("Window %s has take_focus = %d delete_window = %d\n", - window->desc, window->take_focus, window->delete_window); + meta_verbose ("Window %s has take_focus = %d delete_window = %d net_wm_ping = %d\n", + window->desc, window->take_focus, window->delete_window, + window->net_wm_ping); return meta_error_trap_pop (window->display); } diff --git a/src/window.h b/src/window.h index 019a4af9..873d97ed 100644 --- a/src/window.h +++ b/src/window.h @@ -119,9 +119,10 @@ struct _MetaWindow /* whether an initial workspace was explicitly set */ guint initial_workspace_set : 1; - /* These are the two flags from WM_PROTOCOLS */ + /* These are the flags from WM_PROTOCOLS */ guint take_focus : 1; guint delete_window : 1; + guint net_wm_ping : 1; /* Globally active / No input */ guint input : 1; |