mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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
This commit is contained in:
parent
1ee119f3dc
commit
2a71cab8c4
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user