mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
window-x11: Move delete_window to MetaWindowX11Private
https://gitlab.gnome.org/GNOME/mutter/merge_requests/421
This commit is contained in:
parent
6c3b0cfc36
commit
3bf80a967c
@ -327,7 +327,6 @@ struct _MetaWindow
|
|||||||
guint icon_geometry_set : 1;
|
guint icon_geometry_set : 1;
|
||||||
|
|
||||||
/* These are the flags from WM_PROTOCOLS */
|
/* These are the flags from WM_PROTOCOLS */
|
||||||
guint delete_window : 1;
|
|
||||||
guint can_ping : 1;
|
guint can_ping : 1;
|
||||||
/* Globally active / No input */
|
/* Globally active / No input */
|
||||||
guint input : 1;
|
guint input : 1;
|
||||||
|
@ -1079,7 +1079,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
|||||||
window->initial_timestamp_set = FALSE;
|
window->initial_timestamp_set = FALSE;
|
||||||
window->net_wm_user_time_set = FALSE;
|
window->net_wm_user_time_set = FALSE;
|
||||||
window->user_time_window = None;
|
window->user_time_window = None;
|
||||||
window->delete_window = FALSE;
|
|
||||||
window->can_ping = FALSE;
|
window->can_ping = FALSE;
|
||||||
window->input = TRUE;
|
window->input = TRUE;
|
||||||
window->calc_placement = FALSE;
|
window->calc_placement = FALSE;
|
||||||
|
@ -1531,9 +1531,9 @@ reload_wm_protocols (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
window->delete_window = FALSE;
|
|
||||||
window->can_ping = FALSE;
|
window->can_ping = FALSE;
|
||||||
meta_window_x11_set_wm_take_focus (window, FALSE);
|
meta_window_x11_set_wm_take_focus (window, FALSE);
|
||||||
|
meta_window_x11_set_wm_delete_window (window, FALSE);
|
||||||
|
|
||||||
if (value->type == META_PROP_VALUE_INVALID)
|
if (value->type == META_PROP_VALUE_INVALID)
|
||||||
return;
|
return;
|
||||||
@ -1546,7 +1546,7 @@ reload_wm_protocols (MetaWindow *window,
|
|||||||
meta_window_x11_set_wm_take_focus (window, TRUE);
|
meta_window_x11_set_wm_take_focus (window, TRUE);
|
||||||
else if (value->v.atom_list.atoms[i] ==
|
else if (value->v.atom_list.atoms[i] ==
|
||||||
window->display->x11_display->atom_WM_DELETE_WINDOW)
|
window->display->x11_display->atom_WM_DELETE_WINDOW)
|
||||||
window->delete_window = TRUE;
|
meta_window_x11_set_wm_delete_window (window, TRUE);
|
||||||
else if (value->v.atom_list.atoms[i] ==
|
else if (value->v.atom_list.atoms[i] ==
|
||||||
window->display->x11_display->atom__NET_WM_PING)
|
window->display->x11_display->atom__NET_WM_PING)
|
||||||
window->can_ping = TRUE;
|
window->can_ping = TRUE;
|
||||||
|
@ -48,6 +48,7 @@ struct _MetaWindowX11Private
|
|||||||
guint wm_state_skip_taskbar : 1;
|
guint wm_state_skip_taskbar : 1;
|
||||||
guint wm_state_skip_pager : 1;
|
guint wm_state_skip_pager : 1;
|
||||||
guint wm_take_focus : 1;
|
guint wm_take_focus : 1;
|
||||||
|
guint wm_delete_window : 1;
|
||||||
|
|
||||||
/* Weird "_NET_WM_STATE_MODAL" flag */
|
/* Weird "_NET_WM_STATE_MODAL" flag */
|
||||||
guint wm_state_modal : 1;
|
guint wm_state_modal : 1;
|
||||||
|
@ -691,14 +691,28 @@ meta_window_x11_ping (MetaWindow *window,
|
|||||||
send_icccm_message (window, display->x11_display->atom__NET_WM_PING, serial);
|
send_icccm_message (window, display->x11_display->atom__NET_WM_PING, serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_window_x11_set_wm_delete_window (MetaWindow *window,
|
||||||
|
gboolean delete_window)
|
||||||
|
{
|
||||||
|
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||||
|
MetaWindowX11Private *priv =
|
||||||
|
meta_window_x11_get_instance_private (window_x11);
|
||||||
|
|
||||||
|
priv->wm_delete_window = delete_window;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_x11_delete (MetaWindow *window,
|
meta_window_x11_delete (MetaWindow *window,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
|
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||||
|
MetaWindowX11Private *priv =
|
||||||
|
meta_window_x11_get_instance_private (window_x11);
|
||||||
MetaX11Display *x11_display = window->display->x11_display;
|
MetaX11Display *x11_display = window->display->x11_display;
|
||||||
|
|
||||||
meta_x11_error_trap_push (x11_display);
|
meta_x11_error_trap_push (x11_display);
|
||||||
if (window->delete_window)
|
if (priv->wm_delete_window)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Deleting %s with delete_window request\n",
|
"Deleting %s with delete_window request\n",
|
||||||
|
@ -53,6 +53,8 @@ void meta_window_x11_set_net_wm_state (MetaWindow *window);
|
|||||||
void meta_window_x11_set_wm_state (MetaWindow *window);
|
void meta_window_x11_set_wm_state (MetaWindow *window);
|
||||||
void meta_window_x11_set_wm_take_focus (MetaWindow *window,
|
void meta_window_x11_set_wm_take_focus (MetaWindow *window,
|
||||||
gboolean take_focus);
|
gboolean take_focus);
|
||||||
|
void meta_window_x11_set_wm_delete_window (MetaWindow *window,
|
||||||
|
gboolean delete_window);
|
||||||
void meta_window_x11_set_allowed_actions_hint (MetaWindow *window);
|
void meta_window_x11_set_allowed_actions_hint (MetaWindow *window);
|
||||||
|
|
||||||
void meta_window_x11_create_sync_request_alarm (MetaWindow *window);
|
void meta_window_x11_create_sync_request_alarm (MetaWindow *window);
|
||||||
|
Loading…
Reference in New Issue
Block a user