aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ewmh.cc')
-rw-r--r--src/Ewmh.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index bab543b..52568a1 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -695,22 +695,13 @@ void Ewmh::setupClient(WinClient &winclient) {
695 695
696void Ewmh::setupFrame(FluxboxWindow &win) { 696void Ewmh::setupFrame(FluxboxWindow &win) {
697 setupState(win); 697 setupState(win);
698 698 bool exists;
699 Atom ret_type; 699 unsigned int desktop=static_cast<unsigned int>(win.winClient().cardinalProperty(m_net->wm_desktop, &exists));
700 int fmt; 700 if (exists) {
701 unsigned long nitems, bytes_after;
702 unsigned char *data = 0;
703
704 if (win.winClient().property(m_net->wm_desktop, 0, 1, False, XA_CARDINAL,
705 &ret_type, &fmt, &nitems, &bytes_after,
706 (unsigned char **) &data) && data) {
707 unsigned int desktop = static_cast<long>(*data);
708 if (desktop == (unsigned int)(-1) && !win.isStuck()) 701 if (desktop == (unsigned int)(-1) && !win.isStuck())
709 win.stick(); 702 win.stick();
710 else 703 else
711 win.setWorkspace(desktop); 704 win.setWorkspace(desktop);
712
713 XFree(data);
714 } else { 705 } else {
715 updateWorkspace(win); 706 updateWorkspace(win);
716 } 707 }