diff options
author | Danny Baumann <dannybaumann@web.de> | 2009-03-16 08:43:37 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2009-03-16 08:43:37 +0100 |
commit | d8971221a3d271d18879d625aaaf89cc0df9eb63 (patch) | |
tree | 2511e4b3373a3609ed964afcc28dfb65c8305bec | |
parent | d869d03c93b57b8cf880fc3fc1d5857357786e8b (diff) | |
download | mobileperf-d8971221a3d271d18879d625aaaf89cc0df9eb63.tar.gz mobileperf-d8971221a3d271d18879d625aaaf89cc0df9eb63.tar.bz2 |
Expose setDesktop function.
-rw-r--r-- | include/core/window.h | 2 | ||||
-rw-r--r-- | src/event.cpp | 4 | ||||
-rw-r--r-- | src/privatewindow.h | 2 | ||||
-rw-r--r-- | src/screen.cpp | 2 | ||||
-rw-r--r-- | src/window.cpp | 10 |
5 files changed, 10 insertions, 10 deletions
diff --git a/include/core/window.h b/include/core/window.h index 145d9a8..689312b 100644 --- a/include/core/window.h +++ b/include/core/window.h @@ -399,6 +399,8 @@ class CompWindow : int outputDevice (); + void setDesktop (unsigned int desktop); + bool onCurrentDesktop (); bool onAllViewports (); diff --git a/src/event.cpp b/src/event.cpp index 0605e75..6a2338e 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -1143,7 +1143,7 @@ CompScreen::handleEvent (XEvent *event) if (type & (CompWindowTypeDockMask | CompWindowTypeDesktopMask)) - w->priv->setDesktop (0xffffffff); + w->setDesktop (0xffffffff); priv->updateClientList (); @@ -1473,7 +1473,7 @@ CompScreen::handleEvent (XEvent *event) { w = findWindow (event->xclient.window); if (w) - w->priv->setDesktop (event->xclient.data.l[0]); + w->setDesktop (event->xclient.data.l[0]); } else if (event->xclient.message_type == Atoms::wmFullscreenMonitors) { diff --git a/src/privatewindow.h b/src/privatewindow.h index 1e776f7..7d6fe48 100644 --- a/src/privatewindow.h +++ b/src/privatewindow.h @@ -176,8 +176,6 @@ class PrivateWindow { void freeIcons (); - void setDesktop (unsigned int desktop); - void updateMwmHints (); void updateStartupId (); diff --git a/src/screen.cpp b/src/screen.cpp index 57baaf2..f3b158b 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -3628,7 +3628,7 @@ PrivateScreen::setNumberOfDesktops (unsigned int nDesktop) continue; if (w->desktop () >= nDesktop) - w->priv->setDesktop (nDesktop - 1); + w->setDesktop (nDesktop - 1); } priv->nDesktop = nDesktop; diff --git a/src/window.cpp b/src/window.cpp index 8d7e3bb..d66183a 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3954,7 +3954,7 @@ CompWindow::onCurrentDesktop () } void -PrivateWindow::setDesktop (unsigned int desktop) +CompWindow::setDesktop (unsigned int desktop) { if (desktop != 0xffffffff) { @@ -3971,9 +3971,9 @@ PrivateWindow::setDesktop (unsigned int desktop) priv->desktop = desktop; if (desktop == 0xffffffff || desktop == screen->currentDesktop ()) - window->show (); + show (); else - window->hide (); + hide (); screen->setWindowProp (priv->id, Atoms::winDesktop, priv->desktop); } @@ -4504,7 +4504,7 @@ PrivateWindow::applyStartupProperties (CompStartupSequence *s) workspace = sn_startup_sequence_get_workspace (s->sequence); if (workspace >= 0) - setDesktop (workspace); + window->setDesktop (workspace); priv->initialTimestamp = sn_startup_sequence_get_timestamp (s->sequence); @@ -4758,7 +4758,7 @@ CompWindow::CompWindow (Window id, if (priv->wmType & (CompWindowTypeDockMask | CompWindowTypeDesktopMask)) { - priv->setDesktop (0xffffffff); + setDesktop (0xffffffff); } else { |