Changeset View
Changeset View
Standalone View
Standalone View
placement.cpp
Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Line(s) | 201 | { | |||
---|---|---|---|---|---|
205 | * SmartPlacement by Cristian Tibirna (tibirna@kde.org) | 205 | * SmartPlacement by Cristian Tibirna (tibirna@kde.org) | ||
206 | * adapted for kwm (16-19jan98) and for kwin (16Nov1999) using (with | 206 | * adapted for kwm (16-19jan98) and for kwin (16Nov1999) using (with | ||
207 | * permission) ideas from fvwm, authored by | 207 | * permission) ideas from fvwm, authored by | ||
208 | * Anthony Martin (amartin@engr.csulb.edu). | 208 | * Anthony Martin (amartin@engr.csulb.edu). | ||
209 | * Xinerama supported added by Balaji Ramani (balaji@yablibli.com) | 209 | * Xinerama supported added by Balaji Ramani (balaji@yablibli.com) | ||
210 | * with ideas from xfce. | 210 | * with ideas from xfce. | ||
211 | */ | 211 | */ | ||
212 | 212 | | |||
213 | if (!c->size().isValid()) { | 213 | if (!c->frameGeometry().isValid()) { | ||
214 | return; | 214 | return; | ||
215 | } | 215 | } | ||
216 | 216 | | |||
217 | const int none = 0, h_wrong = -1, w_wrong = -2; // overlap types | 217 | const int none = 0, h_wrong = -1, w_wrong = -2; // overlap types | ||
218 | long int overlap, min_overlap = 0; | 218 | long int overlap, min_overlap = 0; | ||
219 | int x_optimal, y_optimal; | 219 | int x_optimal, y_optimal; | ||
220 | int possible; | 220 | int possible; | ||
221 | int desktop = c->desktop() == 0 || c->isOnAllDesktops() ? VirtualDesktopManager::self()->current() : c->desktop(); | 221 | int desktop = c->desktop() == 0 || c->isOnAllDesktops() ? VirtualDesktopManager::self()->current() : c->desktop(); | ||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | |||||
380 | 380 | | |||
381 | /** | 381 | /** | ||
382 | * Place windows in a cascading order, remembering positions for each desktop | 382 | * Place windows in a cascading order, remembering positions for each desktop | ||
383 | */ | 383 | */ | ||
384 | void Placement::placeCascaded(AbstractClient *c, const QRect &area, Policy nextPlacement) | 384 | void Placement::placeCascaded(AbstractClient *c, const QRect &area, Policy nextPlacement) | ||
385 | { | 385 | { | ||
386 | Q_ASSERT(area.isValid()); | 386 | Q_ASSERT(area.isValid()); | ||
387 | 387 | | |||
388 | if (!c->size().isValid()) { | 388 | if (!c->frameGeometry().isValid()) { | ||
389 | return; | 389 | return; | ||
390 | } | 390 | } | ||
391 | 391 | | |||
392 | /* cascadePlacement by Cristian Tibirna (tibirna@kde.org) (30Jan98) | 392 | /* cascadePlacement by Cristian Tibirna (tibirna@kde.org) (30Jan98) | ||
393 | */ | 393 | */ | ||
394 | // work coords | 394 | // work coords | ||
395 | int xp, yp; | 395 | int xp, yp; | ||
396 | 396 | | |||
▲ Show 20 Lines • Show All 581 Lines • Show Last 20 Lines |