Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 81 | const NET::Properties2 properties2 = | |||
---|---|---|---|---|---|
90 | NET::WM2FrameOverlap | | 90 | NET::WM2FrameOverlap | | ||
91 | NET::WM2GroupLeader | | 91 | NET::WM2GroupLeader | | ||
92 | NET::WM2Urgency | | 92 | NET::WM2Urgency | | ||
93 | NET::WM2Input | | 93 | NET::WM2Input | | ||
94 | NET::WM2Protocols | | 94 | NET::WM2Protocols | | ||
95 | NET::WM2InitialMappingState | | 95 | NET::WM2InitialMappingState | | ||
96 | NET::WM2IconPixmap | | 96 | NET::WM2IconPixmap | | ||
97 | NET::WM2OpaqueRegion | | 97 | NET::WM2OpaqueRegion | | ||
98 | NET::WM2DesktopFileName; | 98 | NET::WM2DesktopFileName | | ||
99 | NET::WM2GTKFrameExtents; | ||||
99 | 100 | | |||
100 | auto wmClientLeaderCookie = fetchWmClientLeader(); | 101 | auto wmClientLeaderCookie = fetchWmClientLeader(); | ||
101 | auto skipCloseAnimationCookie = fetchSkipCloseAnimation(); | 102 | auto skipCloseAnimationCookie = fetchSkipCloseAnimation(); | ||
102 | auto gtkFrameExtentsCookie = fetchGtkFrameExtents(); | | |||
103 | auto showOnScreenEdgeCookie = fetchShowOnScreenEdge(); | 103 | auto showOnScreenEdgeCookie = fetchShowOnScreenEdge(); | ||
104 | auto colorSchemeCookie = fetchColorScheme(); | 104 | auto colorSchemeCookie = fetchColorScheme(); | ||
105 | auto firstInTabBoxCookie = fetchFirstInTabBox(); | 105 | auto firstInTabBoxCookie = fetchFirstInTabBox(); | ||
106 | auto transientCookie = fetchTransient(); | 106 | auto transientCookie = fetchTransient(); | ||
107 | auto activitiesCookie = fetchActivities(); | 107 | auto activitiesCookie = fetchActivities(); | ||
108 | auto applicationMenuServiceNameCookie = fetchApplicationMenuServiceName(); | 108 | auto applicationMenuServiceNameCookie = fetchApplicationMenuServiceName(); | ||
109 | auto applicationMenuObjectPathCookie = fetchApplicationMenuObjectPath(); | 109 | auto applicationMenuObjectPathCookie = fetchApplicationMenuObjectPath(); | ||
110 | 110 | | |||
Show All 22 Lines | |||||
133 | setupWindowRules(false); | 133 | setupWindowRules(false); | ||
134 | setCaption(cap_normal, true); | 134 | setCaption(cap_normal, true); | ||
135 | 135 | | |||
136 | connect(this, &X11Client::windowClassChanged, this, &X11Client::evaluateWindowRules); | 136 | connect(this, &X11Client::windowClassChanged, this, &X11Client::evaluateWindowRules); | ||
137 | 137 | | |||
138 | if (Xcb::Extensions::self()->isShapeAvailable()) | 138 | if (Xcb::Extensions::self()->isShapeAvailable()) | ||
139 | xcb_shape_select_input(connection(), window(), true); | 139 | xcb_shape_select_input(connection(), window(), true); | ||
140 | detectShape(window()); | 140 | detectShape(window()); | ||
141 | readGtkFrameExtents(gtkFrameExtentsCookie); | | |||
142 | detectNoBorder(); | 141 | detectNoBorder(); | ||
143 | fetchIconicName(); | 142 | fetchIconicName(); | ||
143 | setClientFrameExtents(info->gtkFrameExtents()); | ||||
144 | 144 | | |||
145 | // Needs to be done before readTransient() because of reading the group | 145 | // Needs to be done before readTransient() because of reading the group | ||
146 | checkGroup(); | 146 | checkGroup(); | ||
147 | updateUrgency(); | 147 | updateUrgency(); | ||
148 | updateAllowedActions(); // Group affects isMinimizable() | 148 | updateAllowedActions(); // Group affects isMinimizable() | ||
149 | 149 | | |||
150 | setModal((info->state() & NET::Modal) != 0); // Needs to be valid before handling groups | 150 | setModal((info->state() & NET::Modal) != 0); // Needs to be valid before handling groups | ||
151 | readTransientProperty(transientCookie); | 151 | readTransientProperty(transientCookie); | ||
▲ Show 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 329 | geom.setSize(geom.size().boundedTo( | |||
330 | rules()->checkMaxSize(m_geometryHints.maxSize()))); | 330 | rules()->checkMaxSize(m_geometryHints.maxSize()))); | ||
331 | if (m_geometryHints.hasMinSize()) | 331 | if (m_geometryHints.hasMinSize()) | ||
332 | geom.setSize(geom.size().expandedTo( | 332 | geom.setSize(geom.size().expandedTo( | ||
333 | rules()->checkMinSize(m_geometryHints.minSize()))); | 333 | rules()->checkMinSize(m_geometryHints.minSize()))); | ||
334 | 334 | | |||
335 | if (isMovable() && (geom.x() > area.right() || geom.y() > area.bottom())) | 335 | if (isMovable() && (geom.x() > area.right() || geom.y() > area.bottom())) | ||
336 | placementDone = false; // Weird, do not trust. | 336 | placementDone = false; // Weird, do not trust. | ||
337 | 337 | | |||
338 | if (placementDone) | 338 | if (placementDone) { | ||
339 | move(geom.x(), geom.y()); // Before gravitating | 339 | QPoint position = geom.topLeft(); | ||
340 | // Session contains the position of the frame geometry before gravitating. | ||||
341 | if (!session) { | ||||
342 | position = clientPosToFramePos(position); | ||||
343 | } | ||||
344 | move(position); | ||||
345 | } | ||||
340 | 346 | | |||
341 | // Create client group if the window will have a decoration | 347 | // Create client group if the window will have a decoration | ||
342 | bool dontKeepInArea = false; | 348 | bool dontKeepInArea = false; | ||
343 | readColorScheme(colorSchemeCookie); | 349 | readColorScheme(colorSchemeCookie); | ||
344 | 350 | | |||
345 | readApplicationMenuServiceName(applicationMenuServiceNameCookie); | 351 | readApplicationMenuServiceName(applicationMenuServiceNameCookie); | ||
346 | readApplicationMenuObjectPath(applicationMenuObjectPathCookie); | 352 | readApplicationMenuObjectPath(applicationMenuObjectPathCookie); | ||
347 | 353 | | |||
▲ Show 20 Lines • Show All 347 Lines • Show Last 20 Lines |