Split unplaced transient and dialog handling
Shouldn't make much difference but makes the code a bit easier to follow.
This commit is contained in:
parent
524540f7a8
commit
c23bca5c26
|
@ -946,9 +946,9 @@ AddToFamily(EWin * ewin, EX_Window xwin, XWindowAttributes * pxwa, int startup)
|
|||
x = MAX(x, sx);
|
||||
y = MAX(y, sy);
|
||||
}
|
||||
else if (ewin->ewmh.type.b.dialog)
|
||||
else if (ewin->icccm.transient)
|
||||
{
|
||||
/* Center unplaced dialogs on parent(if transient) or root */
|
||||
/* Center unplaced transients on parent (or root) */
|
||||
Win parent;
|
||||
|
||||
ewin2 = NULL;
|
||||
|
@ -970,6 +970,11 @@ AddToFamily(EWin * ewin, EX_Window xwin, XWindowAttributes * pxwa, int startup)
|
|||
x = MAX(x, sx);
|
||||
y = MAX(y, sy);
|
||||
}
|
||||
else if (ewin->ewmh.type.b.dialog)
|
||||
{
|
||||
/* Center unplaced (non-transient) dialogs on root */
|
||||
ArrangeEwinCenteredXY(ewin, &x, &y);
|
||||
}
|
||||
else
|
||||
{
|
||||
ArrangeEwinXY(ewin, &x, &y);
|
||||
|
|
Loading…
Reference in New Issue