From e1b57162280aca74fc1440b9fc9b93a748c895e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 18 Nov 2013 13:58:35 +0100 Subject: [PATCH] [kwin] Adjust to API-changes in NETRootInfo --- netinfo.cpp | 16 ++++++++-------- netinfo.h | 14 +++++++------- workspace.cpp | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/netinfo.cpp b/netinfo.cpp index a442304e85..c1c2c06adf 100644 --- a/netinfo.cpp +++ b/netinfo.cpp @@ -151,7 +151,7 @@ void RootInfo::destroy() } RootInfo::RootInfo(xcb_window_t w, const char *name, unsigned long pr[], int pr_num, int scr) - : NETRootInfo(display(), w, name, pr, pr_num, scr) + : NETRootInfo(connection(), w, name, pr, pr_num, scr) { } @@ -165,7 +165,7 @@ void RootInfo::changeCurrentDesktop(int d) VirtualDesktopManager::self()->setCurrent(d); } -void RootInfo::changeActiveWindow(Window w, NET::RequestSource src, Time timestamp, Window active_window) +void RootInfo::changeActiveWindow(xcb_window_t w, NET::RequestSource src, xcb_timestamp_t timestamp, xcb_window_t active_window) { Workspace *workspace = Workspace::self(); if (Client* c = workspace->findClient(WindowMatchPredicate(w))) { @@ -193,7 +193,7 @@ void RootInfo::changeActiveWindow(Window w, NET::RequestSource src, Time timesta } } -void RootInfo::restackWindow(Window w, RequestSource src, Window above, int detail, Time timestamp) +void RootInfo::restackWindow(xcb_window_t w, RequestSource src, xcb_window_t above, int detail, xcb_timestamp_t timestamp) { if (Client* c = Workspace::self()->findClient(WindowMatchPredicate(w))) { if (timestamp == CurrentTime) @@ -204,21 +204,21 @@ void RootInfo::restackWindow(Window w, RequestSource src, Window above, int deta } } -void RootInfo::gotTakeActivity(Window w, Time timestamp, long flags) +void RootInfo::gotTakeActivity(xcb_window_t w, xcb_timestamp_t timestamp, long flags) { Workspace *workspace = Workspace::self(); if (Client* c = workspace->findClient(WindowMatchPredicate(w))) workspace->handleTakeActivity(c, timestamp, flags); } -void RootInfo::closeWindow(Window w) +void RootInfo::closeWindow(xcb_window_t w) { Client* c = Workspace::self()->findClient(WindowMatchPredicate(w)); if (c) c->closeWindow(); } -void RootInfo::moveResize(Window w, int x_root, int y_root, unsigned long direction) +void RootInfo::moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) { Client* c = Workspace::self()->findClient(WindowMatchPredicate(w)); if (c) { @@ -227,14 +227,14 @@ void RootInfo::moveResize(Window w, int x_root, int y_root, unsigned long direct } } -void RootInfo::moveResizeWindow(Window w, int flags, int x, int y, int width, int height) +void RootInfo::moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) { Client* c = Workspace::self()->findClient(WindowMatchPredicate(w)); if (c) c->NETMoveResizeWindow(flags, x, y, width, height); } -void RootInfo::gotPing(Window w, Time timestamp) +void RootInfo::gotPing(xcb_window_t w, xcb_timestamp_t timestamp) { if (Client* c = Workspace::self()->findClient(WindowMatchPredicate(w))) c->gotPing(timestamp); diff --git a/netinfo.h b/netinfo.h index 0ce782d9c8..b9ad733bcd 100644 --- a/netinfo.h +++ b/netinfo.h @@ -47,13 +47,13 @@ public: protected: virtual void changeNumberOfDesktops(int n) override; virtual void changeCurrentDesktop(int d) override; - virtual void changeActiveWindow(Window w, NET::RequestSource src, Time timestamp, Window active_window) override; - virtual void closeWindow(Window w) override; - virtual void moveResize(Window w, int x_root, int y_root, unsigned long direction) override; - virtual void moveResizeWindow(Window w, int flags, int x, int y, int width, int height) override; - virtual void gotPing(Window w, Time timestamp) override; - virtual void restackWindow(Window w, RequestSource source, Window above, int detail, Time timestamp) override; - virtual void gotTakeActivity(Window w, Time timestamp, long flags) override; + virtual void changeActiveWindow(xcb_window_t w, NET::RequestSource src, xcb_timestamp_t timestamp, xcb_window_t active_window) override; + virtual void closeWindow(xcb_window_t w) override; + virtual void moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) override; + virtual void moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) override; + virtual void gotPing(xcb_window_t w, xcb_timestamp_t timestamp) override; + virtual void restackWindow(xcb_window_t w, RequestSource source, xcb_window_t above, int detail, xcb_timestamp_t timestamp) override; + virtual void gotTakeActivity(xcb_window_t w, xcb_timestamp_t timestamp, long flags) override; virtual void changeShowingDesktop(bool showing) override; private: diff --git a/workspace.cpp b/workspace.cpp index e05d204bb5..b0c0bd9d42 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -300,7 +300,7 @@ void Workspace::init() vds->updateLayout(); // Extra NETRootInfo instance in Client mode is needed to get the values of the properties - NETRootInfo client_info(display(), NET::ActiveWindow | NET::CurrentDesktop); + NETRootInfo client_info(connection(), NET::ActiveWindow | NET::CurrentDesktop); int initial_desktop; if (!qApp->isSessionRestored()) initial_desktop = client_info.currentDesktop();