Changeset View
Changeset View
Standalone View
Standalone View
netinfo.cpp
Show All 20 Lines | |||||
21 | *********************************************************************/ | 21 | *********************************************************************/ | ||
22 | // own | 22 | // own | ||
23 | #include "netinfo.h" | 23 | #include "netinfo.h" | ||
24 | // kwin | 24 | // kwin | ||
25 | #include "client.h" | 25 | #include "client.h" | ||
26 | #include "rootinfo_filter.h" | 26 | #include "rootinfo_filter.h" | ||
27 | #include "virtualdesktops.h" | 27 | #include "virtualdesktops.h" | ||
28 | #include "workspace.h" | 28 | #include "workspace.h" | ||
29 | #include "xcbutils.h" | ||||
29 | // Qt | 30 | // Qt | ||
30 | #include <QDebug> | 31 | #include <QDebug> | ||
31 | 32 | | |||
32 | namespace KWin | 33 | namespace KWin | ||
33 | { | 34 | { | ||
34 | extern int screen_number; | 35 | extern int screen_number; | ||
35 | 36 | | |||
36 | RootInfo *RootInfo::s_self = nullptr; | 37 | RootInfo *RootInfo::s_self = nullptr; | ||
▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Line(s) | 204 | if (c) | |||
204 | c->closeWindow(); | 205 | c->closeWindow(); | ||
205 | } | 206 | } | ||
206 | 207 | | |||
207 | void RootInfo::moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) | 208 | void RootInfo::moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) | ||
208 | { | 209 | { | ||
209 | Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w); | 210 | Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w); | ||
210 | if (c) { | 211 | if (c) { | ||
211 | updateXTime(); // otherwise grabbing may have old timestamp - this message should include timestamp | 212 | updateXTime(); // otherwise grabbing may have old timestamp - this message should include timestamp | ||
212 | c->NETMoveResize(x_root, y_root, (Direction)direction); | 213 | c->NETMoveResize(Xcb::scK(x_root), Xcb::scK(y_root), (Direction)direction); | ||
213 | } | 214 | } | ||
214 | } | 215 | } | ||
215 | 216 | | |||
216 | void RootInfo::moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) | 217 | void RootInfo::moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) | ||
217 | { | 218 | { | ||
218 | Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w); | 219 | Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w); | ||
220 | const QRect geo = Xcb::scK(QRect(x, y, width, height)); | ||||
219 | if (c) | 221 | if (c) | ||
220 | c->NETMoveResizeWindow(flags, x, y, width, height); | 222 | c->NETMoveResizeWindow(flags, geo.x(), geo.y(), geo.width(), geo.height()); | ||
221 | } | 223 | } | ||
222 | 224 | | |||
223 | void RootInfo::gotPing(xcb_window_t w, xcb_timestamp_t timestamp) | 225 | void RootInfo::gotPing(xcb_window_t w, xcb_timestamp_t timestamp) | ||
224 | { | 226 | { | ||
225 | if (Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w)) | 227 | if (Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w)) | ||
226 | c->gotPing(timestamp); | 228 | c->gotPing(timestamp); | ||
227 | } | 229 | } | ||
228 | 230 | | |||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |