Changeset View
Changeset View
Standalone View
Standalone View
effects/windowgeometry/windowgeometry.cpp
Show All 31 Lines | |||||
32 | 32 | | |||
33 | using namespace KWin; | 33 | using namespace KWin; | ||
34 | 34 | | |||
35 | WindowGeometry::WindowGeometry() | 35 | WindowGeometry::WindowGeometry() | ||
36 | { | 36 | { | ||
37 | initConfig<WindowGeometryConfiguration>(); | 37 | initConfig<WindowGeometryConfiguration>(); | ||
38 | iAmActivated = true; | 38 | iAmActivated = true; | ||
39 | iAmActive = false; | 39 | iAmActive = false; | ||
40 | myResizeWindow = 0L; | 40 | myResizeWindow = nullptr; | ||
41 | #define myResizeString "Window geometry display, %1 and %2 are the new size," \ | 41 | #define myResizeString "Window geometry display, %1 and %2 are the new size," \ | ||
42 | " %3 and %4 are pixel increments - avoid reformatting or suffixes like 'px'", \ | 42 | " %3 and %4 are pixel increments - avoid reformatting or suffixes like 'px'", \ | ||
43 | "Width: %1 (%3)\nHeight: %2 (%4)" | 43 | "Width: %1 (%3)\nHeight: %2 (%4)" | ||
44 | #define myCoordString_0 "Window geometry display, %1 and %2 are the cartesian x and y coordinates" \ | 44 | #define myCoordString_0 "Window geometry display, %1 and %2 are the cartesian x and y coordinates" \ | ||
45 | " - avoid reformatting or suffixes like 'px'", \ | 45 | " - avoid reformatting or suffixes like 'px'", \ | ||
46 | "X: %1\nY: %2" | 46 | "X: %1\nY: %2" | ||
47 | #define myCoordString_1 "Window geometry display, %1 and %2 are the cartesian x and y coordinates," \ | 47 | #define myCoordString_1 "Window geometry display, %1 and %2 are the cartesian x and y coordinates," \ | ||
48 | " %3 and %4 are the resp. increments - avoid reformatting or suffixes like 'px'", \ | 48 | " %3 and %4 are the resp. increments - avoid reformatting or suffixes like 'px'", \ | ||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 111 | { | |||
123 | myCurrentGeometry = w->geometry(); | 123 | myCurrentGeometry = w->geometry(); | ||
124 | slotWindowStepUserMovedResized(w, w->geometry()); | 124 | slotWindowStepUserMovedResized(w, w->geometry()); | ||
125 | } | 125 | } | ||
126 | 126 | | |||
127 | void WindowGeometry::slotWindowFinishUserMovedResized(EffectWindow *w) | 127 | void WindowGeometry::slotWindowFinishUserMovedResized(EffectWindow *w) | ||
128 | { | 128 | { | ||
129 | if (iAmActive && w == myResizeWindow) { | 129 | if (iAmActive && w == myResizeWindow) { | ||
130 | iAmActive = false; | 130 | iAmActive = false; | ||
131 | myResizeWindow = 0L; | 131 | myResizeWindow = nullptr; | ||
132 | w->addRepaintFull(); | 132 | w->addRepaintFull(); | ||
133 | if (myExtraDirtyArea.isValid()) | 133 | if (myExtraDirtyArea.isValid()) | ||
134 | w->addLayerRepaint(myExtraDirtyArea); | 134 | w->addLayerRepaint(myExtraDirtyArea); | ||
135 | myExtraDirtyArea = QRect(); | 135 | myExtraDirtyArea = QRect(); | ||
136 | } | 136 | } | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | static inline QString number(int n) | 139 | static inline QString number(int n) | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |