Changeset View
Changeset View
Standalone View
Standalone View
geometry.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | |||||
65 | extern bool is_multihead; | 65 | extern bool is_multihead; | ||
66 | 66 | | |||
67 | /*! | 67 | /*! | ||
68 | Resizes the workspace after an XRANDR screen size change | 68 | Resizes the workspace after an XRANDR screen size change | ||
69 | */ | 69 | */ | ||
70 | void Workspace::desktopResized() | 70 | void Workspace::desktopResized() | ||
71 | { | 71 | { | ||
72 | QRect geom = screens()->geometry(); | 72 | QRect geom = screens()->geometry(); | ||
73 | if (rootInfo()) { | ||||
73 | NETSize desktop_geometry; | 74 | NETSize desktop_geometry; | ||
74 | desktop_geometry.width = geom.width(); | 75 | desktop_geometry.width = geom.width(); | ||
75 | desktop_geometry.height = geom.height(); | 76 | desktop_geometry.height = geom.height(); | ||
76 | rootInfo()->setDesktopGeometry(desktop_geometry); | 77 | rootInfo()->setDesktopGeometry(desktop_geometry); | ||
78 | } | ||||
77 | 79 | | |||
78 | updateClientArea(); | 80 | updateClientArea(); | ||
79 | saveOldScreenSizes(); // after updateClientArea(), so that one still uses the previous one | 81 | saveOldScreenSizes(); // after updateClientArea(), so that one still uses the previous one | ||
80 | 82 | | |||
81 | // TODO: emit a signal instead and remove the deep function calls into edges and effects | 83 | // TODO: emit a signal instead and remove the deep function calls into edges and effects | ||
82 | ScreenEdges::self()->recreateEdges(); | 84 | ScreenEdges::self()->recreateEdges(); | ||
83 | 85 | | |||
84 | if (effects) { | 86 | if (effects) { | ||
▲ Show 20 Lines • Show All 219 Lines • ▼ Show 20 Line(s) | 305 | if (new_sareas[ i ][ iS ] != screenarea [ i ][ iS ]) | |||
304 | changed = true; | 306 | changed = true; | ||
305 | } | 307 | } | ||
306 | 308 | | |||
307 | if (changed) { | 309 | if (changed) { | ||
308 | workarea = new_wareas; | 310 | workarea = new_wareas; | ||
309 | oldrestrictedmovearea = restrictedmovearea; | 311 | oldrestrictedmovearea = restrictedmovearea; | ||
310 | restrictedmovearea = new_rmoveareas; | 312 | restrictedmovearea = new_rmoveareas; | ||
311 | screenarea = new_sareas; | 313 | screenarea = new_sareas; | ||
314 | if (rootInfo()) { | ||||
312 | NETRect r; | 315 | NETRect r; | ||
313 | for (int i = 1; i <= numberOfDesktops; i++) { | 316 | for (int i = 1; i <= numberOfDesktops; i++) { | ||
314 | r.pos.x = workarea[ i ].x(); | 317 | r.pos.x = workarea[ i ].x(); | ||
315 | r.pos.y = workarea[ i ].y(); | 318 | r.pos.y = workarea[ i ].y(); | ||
316 | r.size.width = workarea[ i ].width(); | 319 | r.size.width = workarea[ i ].width(); | ||
317 | r.size.height = workarea[ i ].height(); | 320 | r.size.height = workarea[ i ].height(); | ||
318 | rootInfo()->setWorkArea(i, r); | 321 | rootInfo()->setWorkArea(i, r); | ||
319 | } | 322 | } | ||
323 | } | ||||
320 | 324 | | |||
321 | for (auto it = m_allClients.constBegin(); | 325 | for (auto it = m_allClients.constBegin(); | ||
322 | it != m_allClients.constEnd(); | 326 | it != m_allClients.constEnd(); | ||
323 | ++it) | 327 | ++it) | ||
324 | (*it)->checkWorkspacePosition(); | 328 | (*it)->checkWorkspacePosition(); | ||
325 | for (ClientList::ConstIterator it = desktops.constBegin(); | 329 | for (ClientList::ConstIterator it = desktops.constBegin(); | ||
326 | it != desktops.constEnd(); | 330 | it != desktops.constEnd(); | ||
327 | ++it) | 331 | ++it) | ||
▲ Show 20 Lines • Show All 3197 Lines • Show Last 20 Lines |