don't give focus to transient when it is ambiguous, but only if they have a parent
This commit is contained in:
parent
e9f6255b18
commit
301016fd2b
2 changed files with 13 additions and 1 deletions
|
@ -498,7 +498,7 @@ void client_manage(Window window)
|
||||||
is ambiguous (either the current focus target doesn't have
|
is ambiguous (either the current focus target doesn't have
|
||||||
a timestamp, or they are the same (we probably inherited it
|
a timestamp, or they are the same (we probably inherited it
|
||||||
from them) */
|
from them) */
|
||||||
else if (self->transient_for != NULL &&
|
else if (client_has_parent(self) &&
|
||||||
(!last_time || self->user_time == last_time))
|
(!last_time || self->user_time == last_time))
|
||||||
{
|
{
|
||||||
activate = FALSE;
|
activate = FALSE;
|
||||||
|
@ -2374,6 +2374,13 @@ ObClient *client_search_focus_tree_full(ObClient *self)
|
||||||
return client_search_focus_tree(self);
|
return client_search_focus_tree(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean client_has_parent(ObClient *self)
|
||||||
|
{
|
||||||
|
return (self->transient_for &&
|
||||||
|
(self->transient_for != TRAN_GROUP ||
|
||||||
|
self->group && self->group->members->next));
|
||||||
|
}
|
||||||
|
|
||||||
static ObStackingLayer calc_layer(ObClient *self)
|
static ObStackingLayer calc_layer(ObClient *self)
|
||||||
{
|
{
|
||||||
ObStackingLayer l;
|
ObStackingLayer l;
|
||||||
|
|
|
@ -612,6 +612,11 @@ void client_get_type_and_transientness(ObClient *self);
|
||||||
|
|
||||||
const ObClientIcon *client_icon(ObClient *self, gint w, gint h);
|
const ObClientIcon *client_icon(ObClient *self, gint w, gint h);
|
||||||
|
|
||||||
|
/*! Return TRUE if the client is transient for some other window. Return
|
||||||
|
FALSE if it's not transient or there is no window for it to be
|
||||||
|
transient for */
|
||||||
|
gboolean client_has_parent(ObClient *self);
|
||||||
|
|
||||||
/*! Searches a client's direct parents for a focused window. The function does
|
/*! Searches a client's direct parents for a focused window. The function does
|
||||||
not check for the passed client, only for *ONE LEVEL* of its parents.
|
not check for the passed client, only for *ONE LEVEL* of its parents.
|
||||||
If no focused parentt is found, NULL is returned.
|
If no focused parentt is found, NULL is returned.
|
||||||
|
|
Loading…
Reference in a new issue