Commit 8d027c1d authored by Olivier Fourdan's avatar Olivier Fourdan 🛠

client: Make above/below consistent

The window menu entries would check for valid transients or modal dialog
window to enable or disable the above/below entries.

Yet the actual above/below function would simply check for any transient
or modal dialog, hence denying the request for fake dialogs without an
actual parent window.

Fix the logic to remain consistent, and allows fake dialogs to be placed
above or below other windows.
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <fourdan@xfce.org>
Closes:#458
parent 298c2d54
Pipeline #4127 passed with stages
in 2 minutes and 55 seconds
......@@ -3161,7 +3161,7 @@ void clientToggleLayerAbove (Client *c)
TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
if ((c->type & WINDOW_REGULAR_FOCUSABLE) &&
!clientIsTransientOrModal (c) &&
!clientIsValidTransientOrModal (c) &&
!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
FLAG_UNSET (c->flags, CLIENT_FLAG_BELOW);
......@@ -3176,7 +3176,7 @@ void clientToggleLayerBelow (Client *c)
TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
if ((c->type & WINDOW_REGULAR_FOCUSABLE) &&
!clientIsTransientOrModal (c) &&
!clientIsValidTransientOrModal (c) &&
!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
FLAG_UNSET (c->flags, CLIENT_FLAG_ABOVE);
......
......@@ -2606,7 +2606,9 @@ show_window_menu (Client *c, gint px, gint py, guint button, guint32 timestamp,
ops |= MENU_OP_ABOVE | MENU_OP_BELOW;
}
if (is_transient || FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
if (is_transient ||
!(c->type & WINDOW_REGULAR_FOCUSABLE) ||
FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
insensitive |= MENU_OP_NORMAL | MENU_OP_ABOVE | MENU_OP_BELOW;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment