[kwin] Adjust to API-changes in NETRootInfo

This commit is contained in:
Martin Gräßlin 2013-11-18 13:58:35 +01:00
parent ce674ed509
commit e1b5716228
3 changed files with 16 additions and 16 deletions

View file

@ -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);

View file

@ -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:

View file

@ -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();