diff options
-rw-r--r-- | src/Screen.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 5218319..ad24503 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -398,7 +398,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
398 | int ret_format; | 398 | int ret_format; |
399 | unsigned long ret_nitems, ret_bytes_after; | 399 | unsigned long ret_nitems, ret_bytes_after; |
400 | unsigned char *ret_prop; | 400 | unsigned char *ret_prop; |
401 | if (XGetWindowProperty(disp, m_root_window.window(), wm_check, 0l, 1l, | 401 | if (rootWindow().property(wm_check, 0l, 1l, |
402 | False, XA_WINDOW, &xa_ret_type, &ret_format, &ret_nitems, | 402 | False, XA_WINDOW, &xa_ret_type, &ret_format, &ret_nitems, |
403 | &ret_bytes_after, &ret_prop) == Success) { | 403 | &ret_bytes_after, &ret_prop) == Success) { |
404 | m_restart = (ret_prop != NULL); | 404 | m_restart = (ret_prop != NULL); |
@@ -500,12 +500,11 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
500 | unsigned int first_desktop = 0; | 500 | unsigned int first_desktop = 0; |
501 | if (m_restart) { | 501 | if (m_restart) { |
502 | Atom net_desktop = XInternAtom(disp, "_NET_CURRENT_DESKTOP", False); | 502 | Atom net_desktop = XInternAtom(disp, "_NET_CURRENT_DESKTOP", False); |
503 | // other arguments are already defined above | 503 | if (rootWindow().property(net_desktop, 0l, 1l, |
504 | if (XGetWindowProperty(disp, m_root_window.window(), net_desktop, 0l, | 504 | False, XA_CARDINAL, &xa_ret_type, &ret_format, &ret_nitems, |
505 | 1l, False, XA_CARDINAL, &xa_ret_type, &ret_format, &ret_nitems, | ||
506 | &ret_bytes_after, &ret_prop) == Success) { | 505 | &ret_bytes_after, &ret_prop) == Success) { |
507 | if (ret_prop && (unsigned int) *ret_prop < (unsigned) nr_ws) | 506 | if (ret_prop && static_cast<unsigned int>(*ret_prop) < static_cast<unsigned int>(nr_ws)) |
508 | first_desktop = (unsigned int) *ret_prop; | 507 | first_desktop = static_cast<unsigned int>(*ret_prop); |
509 | XFree(ret_prop); | 508 | XFree(ret_prop); |
510 | } | 509 | } |
511 | } | 510 | } |