aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index b85c3b4..1b27ff3 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.151 2003/05/10 18:15:23 fluxgen Exp $ 25// $Id: Screen.cc,v 1.152 2003/05/10 22:52:44 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -512,6 +512,7 @@ BScreen::BScreen(ResourceManager &rm,
512 m_root_theme(new 512 m_root_theme(new
513 RootTheme(scrn, 513 RootTheme(scrn,
514 *resource.rootcommand)), 514 *resource.rootcommand)),
515 m_root_window(scrn),
515 resource(rm, screenname, altscreenname), 516 resource(rm, screenname, altscreenname),
516 m_toolbarhandler(0) { 517 m_toolbarhandler(0) {
517 518
@@ -523,7 +524,7 @@ BScreen::BScreen(ResourceManager &rm,
523 ButtonPressMask | ButtonReleaseMask| SubstructureNotifyMask; 524 ButtonPressMask | ButtonReleaseMask| SubstructureNotifyMask;
524 525
525 XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); 526 XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning);
526 XSelectInput(disp, getRootWindow(), event_mask); 527 rootWindow().setEventMask(event_mask);
527 XSync(disp, False); 528 XSync(disp, False);
528 XSetErrorHandler((XErrorHandler) old); 529 XSetErrorHandler((XErrorHandler) old);
529 530
@@ -539,14 +540,14 @@ BScreen::BScreen(ResourceManager &rm,
539 FBNLS::ScreenSet, FBNLS::ScreenManagingScreen, 540 FBNLS::ScreenSet, FBNLS::ScreenManagingScreen,
540 "BScreen::BScreen: managing screen %d " 541 "BScreen::BScreen: managing screen %d "
541 "using visual 0x%lx, depth %d\n"), 542 "using visual 0x%lx, depth %d\n"),
542 getScreenNumber(), XVisualIDFromVisual(getVisual()), 543 getScreenNumber(), XVisualIDFromVisual(rootWindow().visual()),
543 getDepth()); 544 rootWindow().depth());
544 545
545 Fluxbox * const fluxbox = Fluxbox::instance(); 546 Fluxbox * const fluxbox = Fluxbox::instance();
546#ifdef HAVE_GETPID 547#ifdef HAVE_GETPID
547 pid_t bpid = getpid(); 548 pid_t bpid = getpid();
548 549
549 XChangeProperty(disp, getRootWindow(), 550 XChangeProperty(disp, rootWindow().window(),
550 Fluxbox::instance()->getFluxboxPidAtom(), XA_CARDINAL, 551 Fluxbox::instance()->getFluxboxPidAtom(), XA_CARDINAL,
551 sizeof(pid_t) * 8, PropModeReplace, 552 sizeof(pid_t) * 8, PropModeReplace,
552 (unsigned char *) &bpid, 1); 553 (unsigned char *) &bpid, 1);
@@ -555,7 +556,7 @@ BScreen::BScreen(ResourceManager &rm,
555 556
556 cycling_window = focused_list.end(); 557 cycling_window = focused_list.end();
557 558
558 XDefineCursor(disp, getRootWindow(), fluxbox->getSessionCursor()); 559 XDefineCursor(disp, rootWindow().window(), fluxbox->getSessionCursor());
559 560
560 image_control = 561 image_control =
561 new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(), 562 new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(),
@@ -591,13 +592,13 @@ BScreen::BScreen(ResourceManager &rm,
591 XSetWindowAttributes attrib; 592 XSetWindowAttributes attrib;
592 unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder; 593 unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder;
593 attrib.border_pixel = m_root_theme->borderColor().pixel(); 594 attrib.border_pixel = m_root_theme->borderColor().pixel();
594 attrib.colormap = colormap(); 595 attrib.colormap = rootWindow().colormap();
595 attrib.save_under = true; 596 attrib.save_under = true;
596 597
597 geom_window = 598 geom_window =
598 XCreateWindow(disp, getRootWindow(), 599 XCreateWindow(disp, rootWindow().window(),
599 0, 0, geom_w, geom_h, rootTheme().borderWidth(), getDepth(), 600 0, 0, geom_w, geom_h, rootTheme().borderWidth(), rootWindow().depth(),
600 InputOutput, getVisual(), mask, &attrib); 601 InputOutput, rootWindow().visual(), mask, &attrib);
601 geom_visible = false; 602 geom_visible = false;
602 603
603 if (winFrameTheme().labelFocusTexture().type() & FbTk::Texture::PARENTRELATIVE) { 604 if (winFrameTheme().labelFocusTexture().type() & FbTk::Texture::PARENTRELATIVE) {
@@ -675,7 +676,7 @@ BScreen::BScreen(ResourceManager &rm,
675 int i; 676 int i;
676 unsigned int nchild; 677 unsigned int nchild;
677 Window r, p, *children; 678 Window r, p, *children;
678 XQueryTree(disp, getRootWindow(), &r, &p, &children, &nchild); 679 XQueryTree(disp, rootWindow().window(), &r, &p, &children, &nchild);
679 680
680 // preen the window list of all icon windows... for better dockapp support 681 // preen the window list of all icon windows... for better dockapp support
681 for (i = 0; i < (int) nchild; i++) { 682 for (i = 0; i < (int) nchild; i++) {
@@ -787,7 +788,7 @@ Pixmap BScreen::rootPixmap() const {
787 int real_format; 788 int real_format;
788 unsigned long items_read, items_left; 789 unsigned long items_read, items_left;
789 unsigned int *data; 790 unsigned int *data;
790 if (XGetWindowProperty(disp, getRootWindow(), 791 if (XGetWindowProperty(disp, rootWindow().window(),
791 XInternAtom(disp, "_XROOTPMAP_ID", false), 792 XInternAtom(disp, "_XROOTPMAP_ID", false),
792 0L, 1L, 793 0L, 1L,
793 false, XA_PIXMAP, &real_type, 794 false, XA_PIXMAP, &real_type,
@@ -2270,16 +2271,13 @@ void BScreen::createStyleMenu(FbTk::Menu &menu,
2270 2271
2271void BScreen::shutdown() { 2272void BScreen::shutdown() {
2272 Display *disp = FbTk::App::instance()->display(); 2273 Display *disp = FbTk::App::instance()->display();
2273 XSelectInput(disp, getRootWindow(), NoEventMask); 2274 rootWindow().setEventMask(NoEventMask);
2274 XSync(disp, False); 2275 XSync(disp, False);
2275 2276
2276 for_each(workspacesList.begin(), 2277 for_each(workspacesList.begin(),
2277 workspacesList.end(), 2278 workspacesList.end(),
2278 mem_fun(&Workspace::shutdown)); 2279 mem_fun(&Workspace::shutdown));
2279 2280
2280
2281
2282
2283#ifdef SLIT 2281#ifdef SLIT
2284 if (m_slit.get()) 2282 if (m_slit.get())
2285 m_slit->shutdown(); 2283 m_slit->shutdown();