Use NET::WM2InitialMappingState instead of XWMHints
One roundtrip to X Server during Client::manage removed. REVIEW: 122068
This commit is contained in:
parent
bf7bf73464
commit
f643b71902
1 changed files with 5 additions and 10 deletions
15
manage.cpp
15
manage.cpp
|
@ -71,15 +71,6 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
|||
|
||||
// SELI TODO: Order all these things in some sane manner
|
||||
|
||||
bool init_minimize = false;
|
||||
XWMHints* hints = XGetWMHints(display(), w);
|
||||
if (hints && (hints->flags & StateHint) && hints->initial_state == IconicState)
|
||||
init_minimize = true;
|
||||
if (hints)
|
||||
XFree(hints);
|
||||
if (isMapped)
|
||||
init_minimize = false; // If it's already mapped, ignore hint
|
||||
|
||||
const NET::Properties properties =
|
||||
NET::WMDesktop |
|
||||
NET::WMState |
|
||||
|
@ -103,10 +94,14 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
|||
NET::WM2GroupLeader |
|
||||
NET::WM2Urgency |
|
||||
NET::WM2Input |
|
||||
NET::WM2Protocols;
|
||||
NET::WM2Protocols |
|
||||
NET::WM2InitialMappingState;
|
||||
|
||||
info = new WinInfo(this, m_client, rootWindow(), properties, properties2);
|
||||
|
||||
// If it's already mapped, ignore hint
|
||||
bool init_minimize = !isMapped && (info->initialMappingState() == NET::Iconic);
|
||||
|
||||
m_colormap = attr->colormap;
|
||||
|
||||
getResourceClass();
|
||||
|
|
Loading…
Reference in a new issue