window: Move xclient_leader to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3211>
This commit is contained in:
parent
bc9cd123e9
commit
c0685fe29b
@ -205,7 +205,6 @@ struct _MetaWindow
|
|||||||
|
|
||||||
Window xtransient_for;
|
Window xtransient_for;
|
||||||
Window xgroup_leader;
|
Window xgroup_leader;
|
||||||
Window xclient_leader;
|
|
||||||
MetaWindow *transient_for;
|
MetaWindow *transient_for;
|
||||||
|
|
||||||
/* Initial workspace property */
|
/* Initial workspace property */
|
||||||
|
@ -1107,7 +1107,6 @@ meta_window_constructed (GObject *object)
|
|||||||
window->cgroup_path = NULL;
|
window->cgroup_path = NULL;
|
||||||
|
|
||||||
window->xtransient_for = None;
|
window->xtransient_for = None;
|
||||||
window->xclient_leader = None;
|
|
||||||
|
|
||||||
window->type = META_WINDOW_NORMAL;
|
window->type = META_WINDOW_NORMAL;
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ struct _MetaWindowX11Private
|
|||||||
Visual *xvisual;
|
Visual *xvisual;
|
||||||
|
|
||||||
Window xwindow;
|
Window xwindow;
|
||||||
|
Window xclient_leader;
|
||||||
|
|
||||||
/* Bypass compositor hints */
|
/* Bypass compositor hints */
|
||||||
MetaBypassCompositorHint bypass_compositor;
|
MetaBypassCompositorHint bypass_compositor;
|
||||||
|
@ -179,9 +179,11 @@ find_client_leader_func (MetaWindow *ancestor,
|
|||||||
static void
|
static void
|
||||||
update_sm_hints (MetaWindow *window)
|
update_sm_hints (MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||||
|
MetaWindowX11Private *priv = meta_window_x11_get_private (window_x11);
|
||||||
Window leader;
|
Window leader;
|
||||||
|
|
||||||
window->xclient_leader = None;
|
priv->xclient_leader = None;
|
||||||
window->sm_client_id = NULL;
|
window->sm_client_id = NULL;
|
||||||
|
|
||||||
/* If not on the current window, we can get the client
|
/* If not on the current window, we can get the client
|
||||||
@ -189,7 +191,7 @@ update_sm_hints (MetaWindow *window)
|
|||||||
* leader, we read the SM_CLIENT_ID from it.
|
* leader, we read the SM_CLIENT_ID from it.
|
||||||
*/
|
*/
|
||||||
leader = read_client_leader (window->display,
|
leader = read_client_leader (window->display,
|
||||||
meta_window_x11_get_xwindow (window));
|
priv->xwindow);
|
||||||
if (leader == None)
|
if (leader == None)
|
||||||
{
|
{
|
||||||
ClientLeaderData d;
|
ClientLeaderData d;
|
||||||
@ -201,7 +203,7 @@ update_sm_hints (MetaWindow *window)
|
|||||||
|
|
||||||
if (leader != None)
|
if (leader != None)
|
||||||
{
|
{
|
||||||
window->xclient_leader = leader;
|
priv->xclient_leader = leader;
|
||||||
|
|
||||||
meta_prop_get_latin1_string (window->display->x11_display, leader,
|
meta_prop_get_latin1_string (window->display->x11_display, leader,
|
||||||
window->display->x11_display->atom_SM_CLIENT_ID,
|
window->display->x11_display->atom_SM_CLIENT_ID,
|
||||||
@ -217,7 +219,7 @@ update_sm_hints (MetaWindow *window)
|
|||||||
* instead of the client leader
|
* instead of the client leader
|
||||||
*/
|
*/
|
||||||
meta_prop_get_latin1_string (window->display->x11_display,
|
meta_prop_get_latin1_string (window->display->x11_display,
|
||||||
meta_window_x11_get_xwindow (window),
|
priv->xwindow,
|
||||||
window->display->x11_display->atom_SM_CLIENT_ID,
|
window->display->x11_display->atom_SM_CLIENT_ID,
|
||||||
&window->sm_client_id);
|
&window->sm_client_id);
|
||||||
|
|
||||||
@ -228,7 +230,7 @@ update_sm_hints (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
meta_verbose ("Window %s client leader: 0x%lx SM_CLIENT_ID: '%s'",
|
meta_verbose ("Window %s client leader: 0x%lx SM_CLIENT_ID: '%s'",
|
||||||
window->desc, window->xclient_leader,
|
window->desc, priv->xclient_leader,
|
||||||
window->sm_client_id ? window->sm_client_id : "none");
|
window->sm_client_id ? window->sm_client_id : "none");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2035,6 +2037,7 @@ meta_window_x11_constructed (GObject *object)
|
|||||||
window->decorated = TRUE;
|
window->decorated = TRUE;
|
||||||
window->hidden = FALSE;
|
window->hidden = FALSE;
|
||||||
priv->border_width = attrs.border_width;
|
priv->border_width = attrs.border_width;
|
||||||
|
priv->xclient_leader = None;
|
||||||
|
|
||||||
g_signal_connect (window, "notify::decorated",
|
g_signal_connect (window, "notify::decorated",
|
||||||
G_CALLBACK (meta_window_x11_update_input_region),
|
G_CALLBACK (meta_window_x11_update_input_region),
|
||||||
|
Loading…
Reference in New Issue
Block a user