aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index bf131fb..a8eca72 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -477,12 +477,11 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
477 unsigned int first_desktop = 0; 477 unsigned int first_desktop = 0;
478 if (m_restart) { 478 if (m_restart) {
479 Atom net_desktop = XInternAtom(disp, "_NET_CURRENT_DESKTOP", False); 479 Atom net_desktop = XInternAtom(disp, "_NET_CURRENT_DESKTOP", False);
480 if (rootWindow().property(net_desktop, 0l, 1l, 480 bool exists;
481 False, XA_CARDINAL, &xa_ret_type, &ret_format, &ret_nitems, 481 unsigned int ret=static_cast<unsigned int>(rootWindow().cardinalProperty(net_desktop, &exists));
482 &ret_bytes_after, &ret_prop) == Success) { 482 if (exists) {
483 if (ret_prop && static_cast<unsigned int>(*ret_prop) < static_cast<unsigned int>(nr_ws)) 483 if (ret < static_cast<unsigned int>(nr_ws))
484 first_desktop = static_cast<unsigned int>(*ret_prop); 484 first_desktop = ret;
485 XFree(ret_prop);
486 } 485 }
487 } 486 }
488 487