1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
10 #endif // HAVE_STDIO_H
14 #endif // HAVE_STRING_H
17 # include <sys/types.h>
19 #endif // HAVE_UNISTD_H
22 #define _(str) gettext(str)
29 #include "bindings.hh"
31 #include "otk/display.hh"
32 #include "otk/property.hh"
38 static int anotherWMRunning(Display *display, XErrorEvent *) {
39 printf(_("Another window manager already running on display %s.\n"),
40 DisplayString(display));
49 Screen::Screen(int screen)
50 : WidgetBase(WidgetBase::Type_Root),
54 assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
55 _info = otk::display->screenInfo(screen);
58 XErrorHandler old = XSetErrorHandler(::anotherWMRunning);
59 XSelectInput(**otk::display, _info->rootWindow(),
61 XSync(**otk::display, false);
62 XSetErrorHandler(old);
64 _managed = !::running;
65 if (! _managed) return; // was unable to manage the screen
68 printf(_("Managing screen %d: visual 0x%lx, depth %d\n"),
69 _number, XVisualIDFromVisual(_info->visual()), _info->depth());
72 otk::Property::set(_info->rootWindow(), otk::Property::atoms.openbox_pid,
73 otk::Property::atoms.cardinal, (unsigned long) getpid());
75 // set the mouse cursor for the root window (the default cursor)
76 XDefineCursor(**otk::display, _info->rootWindow(),
77 openbox->cursors().session);
79 // XXX: initialize the screen's style
81 otk::ustring stylepath;
82 python_get_string("THEME", &stylepath);
83 otk::Configuration sconfig(false);
84 sconfig.setFile(otk::expandTilde(stylepath.c_str()));
85 if (!sconfig.load()) {
86 sconfig.setFile(otk::expandTilde(DEFAULTSTYLE));
87 if (!sconfig.load()) {
88 printf(_("Unable to load default style: %s. Aborting.\n"), DEFAULTSTYLE);
94 otk::display->renderControl(_number)->drawRoot(*_style.rootColor());
96 // set up notification of netwm support
97 changeSupportedAtoms();
99 // Set the netwm properties for geometry
100 unsigned long geometry[] = { _info->width(),
102 otk::Property::set(_info->rootWindow(),
103 otk::Property::atoms.net_desktop_geometry,
104 otk::Property::atoms.cardinal, geometry, 2);
106 // Set the net_desktop_names property
107 std::vector<otk::ustring> names;
108 python_get_stringlist("DESKTOP_NAMES", &names);
109 otk::Property::set(_info->rootWindow(),
110 otk::Property::atoms.net_desktop_names,
111 otk::Property::utf8, names);
112 // the above set() will cause the updateDesktopNames to fire right away so
113 // we have a list of desktop names
117 if (!python_get_long("NUMBER_OF_DESKTOPS", &_num_desktops))
119 changeNumDesktops(_num_desktops); // set the hint
121 changeDesktop(0); // set the hint
123 // create the window which gets focus when no clients get it
124 XSetWindowAttributes attr;
125 attr.override_redirect = true;
126 _focuswindow = XCreateWindow(**otk::display, _info->rootWindow(),
127 -100, -100, 1, 1, 0, 0, InputOnly,
128 _info->visual(), CWOverrideRedirect, &attr);
129 XMapRaised(**otk::display, _focuswindow);
131 // these may be further updated if any pre-existing windows are found in
132 // the manageExising() function
133 changeClientList(); // initialize the client lists, which will be empty
134 calcArea(); // initialize the available working area
136 // register this class as the event handler for the root window
137 openbox->registerHandler(_info->rootWindow(), this);
139 // call the python Startup callbacks
140 EventData data(_number, 0, EventAction::Startup, 0);
141 openbox->bindings()->fireEvent(&data);
147 if (! _managed) return;
149 XSelectInput(**otk::display, _info->rootWindow(), NoEventMask);
151 // unmanage all windows
152 while (!clients.empty())
153 unmanageWindow(clients.front());
155 // call the python Shutdown callbacks
156 EventData data(_number, 0, EventAction::Shutdown, 0);
157 openbox->bindings()->fireEvent(&data);
159 XDestroyWindow(**otk::display, _focuswindow);
160 XDestroyWindow(**otk::display, _supportwindow);
164 void Screen::manageExisting()
166 unsigned int i, j, nchild;
167 Window r, p, *children;
168 XQueryTree(**otk::display, _info->rootWindow(), &r, &p,
171 // preen the window list of all icon windows... for better dockapp support
172 for (i = 0; i < nchild; i++) {
173 if (children[i] == None) continue;
175 XWMHints *wmhints = XGetWMHints(**otk::display,
179 if ((wmhints->flags & IconWindowHint) &&
180 (wmhints->icon_window != children[i])) {
181 for (j = 0; j < nchild; j++) {
182 if (children[j] == wmhints->icon_window) {
193 // manage shown windows
194 for (i = 0; i < nchild; ++i) {
195 if (children[i] == None)
198 XWindowAttributes attrib;
199 if (XGetWindowAttributes(**otk::display, children[i], &attrib)) {
200 if (attrib.override_redirect) continue;
202 if (attrib.map_state != IsUnmapped) {
203 manageWindow(children[i]);
212 void Screen::updateStrut()
214 _strut.left = _strut.right = _strut.top = _strut.bottom = 0;
216 ClientList::iterator it, end = clients.end();
217 for (it = clients.begin(); it != end; ++it) {
218 const otk::Strut &s = (*it)->strut();
219 _strut.left = std::max(_strut.left, s.left);
220 _strut.right = std::max(_strut.right, s.right);
221 _strut.top = std::max(_strut.top, s.top);
222 _strut.bottom = std::max(_strut.bottom, s.bottom);
228 void Screen::calcArea()
230 otk::Rect old_area = _area;
234 // reset to the full areas
235 if (isXineramaActive())
236 xineramaUsableArea = getXineramaAreas();
240 _area.setRect(_strut.left, _strut.top,
241 _info->width() - (_strut.left + _strut.right),
242 _info->height() - (_strut.top + _strut.bottom));
246 if (isXineramaActive()) {
247 // keep each of the ximerama-defined areas inside the strut
248 RectList::iterator xit, xend = xineramaUsableArea.end();
249 for (xit = xineramaUsableArea.begin(); xit != xend; ++xit) {
250 if (xit->x() < usableArea.x()) {
251 xit->setX(usableArea.x());
252 xit->setWidth(xit->width() - usableArea.x());
254 if (xit->y() < usableArea.y()) {
255 xit->setY(usableArea.y());
256 xit->setHeight(xit->height() - usableArea.y());
258 if (xit->x() + xit->width() > usableArea.width())
259 xit->setWidth(usableArea.width() - xit->x());
260 if (xit->y() + xit->height() > usableArea.height())
261 xit->setHeight(usableArea.height() - xit->y());
267 if (old_area != _area) {
268 // the area has changed, adjust all the maximized windows
269 ClientList::iterator it, end = clients.end();
270 for (it = clients.begin(); it != end; ++it)
278 void Screen::changeSupportedAtoms()
280 // create the netwm support window
281 _supportwindow = XCreateSimpleWindow(**otk::display,
283 0, 0, 1, 1, 0, 0, 0);
285 // set supporting window
286 otk::Property::set(_info->rootWindow(),
287 otk::Property::atoms.net_supporting_wm_check,
288 otk::Property::atoms.window, _supportwindow);
290 //set properties on the supporting window
291 otk::Property::set(_supportwindow, otk::Property::atoms.net_wm_name,
292 otk::Property::utf8, "Openbox");
293 otk::Property::set(_supportwindow,
294 otk::Property::atoms.net_supporting_wm_check,
295 otk::Property::atoms.window, _supportwindow);
299 otk::Property::atoms.net_current_desktop,
300 otk::Property::atoms.net_number_of_desktops,
301 otk::Property::atoms.net_desktop_geometry,
302 otk::Property::atoms.net_desktop_viewport,
303 otk::Property::atoms.net_active_window,
304 otk::Property::atoms.net_workarea,
305 otk::Property::atoms.net_client_list,
306 otk::Property::atoms.net_client_list_stacking,
307 otk::Property::atoms.net_desktop_names,
308 otk::Property::atoms.net_close_window,
309 otk::Property::atoms.net_wm_name,
310 otk::Property::atoms.net_wm_visible_name,
311 otk::Property::atoms.net_wm_icon_name,
312 otk::Property::atoms.net_wm_visible_icon_name,
314 otk::Property::atoms.net_wm_desktop,
316 otk::Property::atoms.net_wm_strut,
317 otk::Property::atoms.net_wm_window_type,
318 otk::Property::atoms.net_wm_window_type_desktop,
319 otk::Property::atoms.net_wm_window_type_dock,
320 otk::Property::atoms.net_wm_window_type_toolbar,
321 otk::Property::atoms.net_wm_window_type_menu,
322 otk::Property::atoms.net_wm_window_type_utility,
323 otk::Property::atoms.net_wm_window_type_splash,
324 otk::Property::atoms.net_wm_window_type_dialog,
325 otk::Property::atoms.net_wm_window_type_normal,
327 otk::Property::atoms.net_wm_moveresize,
328 otk::Property::atoms.net_wm_moveresize_size_topleft,
329 otk::Property::atoms.net_wm_moveresize_size_topright,
330 otk::Property::atoms.net_wm_moveresize_size_bottomleft,
331 otk::Property::atoms.net_wm_moveresize_size_bottomright,
332 otk::Property::atoms.net_wm_moveresize_move,
334 otk::Property::atoms.net_wm_allowed_actions,
335 otk::Property::atoms.net_wm_action_move,
336 otk::Property::atoms.net_wm_action_resize,
337 otk::Property::atoms.net_wm_action_minimize,
338 otk::Property::atoms.net_wm_action_shade,
339 /* otk::Property::atoms.net_wm_action_stick,*/
340 otk::Property::atoms.net_wm_action_maximize_horz,
341 otk::Property::atoms.net_wm_action_maximize_vert,
342 otk::Property::atoms.net_wm_action_fullscreen,
343 otk::Property::atoms.net_wm_action_change_desktop,
344 otk::Property::atoms.net_wm_action_close,
346 otk::Property::atoms.net_wm_state,
347 otk::Property::atoms.net_wm_state_modal,
348 otk::Property::atoms.net_wm_state_maximized_vert,
349 otk::Property::atoms.net_wm_state_maximized_horz,
350 otk::Property::atoms.net_wm_state_shaded,
351 otk::Property::atoms.net_wm_state_skip_taskbar,
352 otk::Property::atoms.net_wm_state_skip_pager,
353 otk::Property::atoms.net_wm_state_hidden,
354 otk::Property::atoms.net_wm_state_fullscreen,
355 otk::Property::atoms.net_wm_state_above,
356 otk::Property::atoms.net_wm_state_below,
358 const int num_supported = sizeof(supported)/sizeof(Atom);
360 otk::Property::set(_info->rootWindow(), otk::Property::atoms.net_supported,
361 otk::Property::atoms.atom, supported, num_supported);
365 void Screen::changeClientList()
368 unsigned int size = clients.size();
370 // create an array of the window ids
374 windows = new Window[size];
376 ClientList::const_iterator it = clients.begin();
377 const ClientList::const_iterator end = clients.end();
378 for (; it != end; ++it, ++win_it)
379 *win_it = (*it)->window();
381 windows = (Window*) 0;
383 otk::Property::set(_info->rootWindow(), otk::Property::atoms.net_client_list,
384 otk::Property::atoms.window, windows, size);
389 changeStackingList();
393 void Screen::changeStackingList()
396 unsigned int size = _stacking.size();
398 assert(size == clients.size()); // just making sure.. :)
401 // create an array of the window ids (from bottom to top, reverse order!)
405 windows = new Window[size];
407 ClientList::const_reverse_iterator it = _stacking.rbegin();
408 const ClientList::const_reverse_iterator end = _stacking.rend();
409 for (; it != end; ++it, ++win_it)
410 *win_it = (*it)->window();
412 windows = (Window*) 0;
414 otk::Property::set(_info->rootWindow(),
415 otk::Property::atoms.net_client_list_stacking,
416 otk::Property::atoms.window, windows, size);
423 void Screen::changeWorkArea() {
424 unsigned long *dims = new unsigned long[4 * _num_desktops];
425 for (long i = 0; i < _num_desktops; ++i) {
426 dims[(i * 4) + 0] = _area.x();
427 dims[(i * 4) + 1] = _area.y();
428 dims[(i * 4) + 2] = _area.width();
429 dims[(i * 4) + 3] = _area.height();
431 otk::Property::set(_info->rootWindow(), otk::Property::atoms.net_workarea,
432 otk::Property::atoms.cardinal, dims, 4 * _num_desktops);
437 void Screen::manageWindow(Window window)
441 XSetWindowAttributes attrib_set;
443 XWindowAttributes attrib;
445 otk::display->grab();
447 // check if it has already been unmapped by the time we started mapping
448 // the grab does a sync so we don't have to here
449 if (XCheckTypedWindowEvent(**otk::display, window, DestroyNotify, &e) ||
450 XCheckTypedWindowEvent(**otk::display, window, UnmapNotify, &e)) {
451 XPutBackEvent(**otk::display, &e);
453 otk::display->ungrab();
454 return; // don't manage it
457 if (!XGetWindowAttributes(**otk::display, window, &attrib) ||
458 attrib.override_redirect) {
459 otk::display->ungrab();
460 return; // don't manage it
463 // is the window a docking app
464 if ((wmhint = XGetWMHints(**otk::display, window))) {
465 if ((wmhint->flags & StateHint) &&
466 wmhint->initial_state == WithdrawnState) {
467 //slit->addClient(w); // XXX: make dock apps work!
469 otk::display->ungrab();
476 // choose the events we want to receive on the CLIENT window
477 attrib_set.event_mask = Client::event_mask;
478 attrib_set.do_not_propagate_mask = Client::no_propagate_mask;
479 XChangeWindowAttributes(**otk::display, window,
480 CWEventMask|CWDontPropagate, &attrib_set);
482 // create the Client class, which gets all of the hints on the window
483 client = new Client(_number, window);
484 // register for events
485 openbox->registerHandler(window, client);
486 // add to the wm's map
487 openbox->addClient(window, client);
489 // we dont want a border on the client
490 client->toggleClientBorder(false);
492 // specify that if we exit, the window should not be destroyed and should be
493 // reparented back to root automatically
494 XChangeSaveSet(**otk::display, window, SetModeInsert);
496 // create the decoration frame for the client window
497 client->frame = new Frame(client, &_style);
498 // register the plate for events (map req's)
499 // this involves removing itself from the handler list first, since it is
500 // auto added to the list, being a widget. we won't get any events on the
501 // plate except for events for the client (SubstructureRedirectMask)
502 openbox->clearHandler(client->frame->plate());
503 openbox->registerHandler(client->frame->plate(), client);
505 // add to the wm's map
506 openbox->addClient(client->frame->window(), client);
507 openbox->addClient(client->frame->plate(), client);
508 openbox->addClient(client->frame->titlebar(), client);
509 openbox->addClient(client->frame->label(), client);
510 openbox->addClient(client->frame->button_max(), client);
511 openbox->addClient(client->frame->button_iconify(), client);
512 openbox->addClient(client->frame->button_alldesk(), client);
513 openbox->addClient(client->frame->button_close(), client);
514 openbox->addClient(client->frame->handle(), client);
515 openbox->addClient(client->frame->grip_left(), client);
516 openbox->addClient(client->frame->grip_right(), client);
518 // reparent the client to the frame
519 client->frame->grabClient();
521 if (openbox->state() != Openbox::State_Starting) {
522 // position the window intelligenty .. hopefully :)
523 // call the python PLACEWINDOW binding
524 EventData data(_number, client, EventAction::PlaceWindow, 0);
525 openbox->bindings()->fireEvent(&data);
528 EventData ddata(_number, client, EventAction::DisplayingWindow, 0);
529 openbox->bindings()->fireEvent(&ddata);
531 // if on the current desktop.. (or all desktops)
532 if (client->desktop() == _desktop ||
533 client->desktop() == (signed)0xffffffff) {
534 client->frame->show();
537 client->applyStartupState();
539 otk::display->ungrab();
541 // add to the screen's list
542 clients.push_back(client);
543 // once the client is in the list, update our strut to include the new
544 // client's (it is good that this happens after window placement!)
546 // this puts into the stacking order, then raises it
547 _stacking.push_back(client);
549 // update the root properties
552 openbox->bindings()->grabButtons(true, client);
554 EventData ndata(_number, client, EventAction::NewWindow, 0);
555 openbox->bindings()->fireEvent(&ndata);
558 printf("Managed window 0x%lx frame 0x%lx\n",
559 window, client->frame->window());
564 void Screen::unmanageWindow(Client *client)
566 Frame *frame = client->frame;
568 // call the python CLOSEWINDOW binding
569 EventData data(_number, client, EventAction::CloseWindow, 0);
570 openbox->bindings()->fireEvent(&data);
572 openbox->bindings()->grabButtons(false, client);
574 // remove from the wm's map
575 openbox->removeClient(client->window());
576 openbox->removeClient(frame->window());
577 openbox->removeClient(frame->plate());
578 openbox->removeClient(frame->titlebar());
579 openbox->removeClient(frame->label());
580 openbox->removeClient(frame->button_max());
581 openbox->removeClient(frame->button_iconify());
582 openbox->removeClient(frame->button_alldesk());
583 openbox->removeClient(frame->button_close());
584 openbox->removeClient(frame->handle());
585 openbox->removeClient(frame->grip_left());
586 openbox->removeClient(frame->grip_right());
587 // unregister for handling events
588 openbox->clearHandler(client->window());
590 // remove the window from our save set
591 XChangeSaveSet(**otk::display, client->window(), SetModeDelete);
593 // we dont want events no more
594 XSelectInput(**otk::display, client->window(), NoEventMask);
598 // give the client its border back
599 client->toggleClientBorder(true);
601 // reparent the window out of the frame
602 frame->releaseClient();
605 Window framewin = client->frame->window();
607 delete client->frame;
610 // remove from the stacking order
611 _stacking.remove(client);
613 // remove from the screen's list
614 clients.remove(client);
616 // once the client is out of the list, update our strut to remove it's
620 // unset modal before dropping our focus
621 client->setModal(false);
623 // unfocus the client (calls the focus callbacks)
627 printf("Unmanaged window 0x%lx frame 0x%lx\n", client->window(), framewin);
632 // update the root properties
636 void Screen::lowerWindow(Client *client)
638 Window wins[2]; // only ever restack 2 windows.
640 assert(!_stacking.empty()); // this would be bad
642 ClientList::iterator it = --_stacking.end();
643 const ClientList::iterator end = _stacking.begin();
645 if (client->modal() && client->transientFor()) {
646 // don't let a modal window lower below its transient_for
647 it = std::find(_stacking.begin(), _stacking.end(), client->transientFor());
648 assert(it != _stacking.end());
650 wins[0] = (it == _stacking.begin() ? _focuswindow :
651 ((*(--ClientList::const_iterator(it)))->frame->window()));
652 wins[1] = client->frame->window();
653 if (wins[0] == wins[1]) return; // already right above the window
655 _stacking.remove(client);
656 _stacking.insert(it, client);
658 for (; it != end && (*it)->layer() < client->layer(); --it);
659 if (*it == client) return; // already the bottom, return
661 wins[0] = (*it)->frame->window();
662 wins[1] = client->frame->window();
664 _stacking.remove(client);
665 _stacking.insert(++it, client);
668 XRestackWindows(**otk::display, wins, 2);
669 changeStackingList();
672 void Screen::raiseWindow(Client *client)
674 Window wins[2]; // only ever restack 2 windows.
676 assert(!_stacking.empty()); // this would be bad
678 // remove the client before looking so we can't run into ourselves
679 _stacking.remove(client);
681 ClientList::iterator it = _stacking.begin();
682 const ClientList::iterator end = _stacking.end();
684 // the stacking list is from highest to lowest
685 for (; it != end && (*it)->layer() > client->layer(); ++it);
688 if our new position is the top, we want to stack under the _focuswindow
689 otherwise, we want to stack under the previous window in the stack.
691 wins[0] = (it == _stacking.begin() ? _focuswindow :
692 ((*(--ClientList::const_iterator(it)))->frame->window()));
693 wins[1] = client->frame->window();
695 _stacking.insert(it, client);
697 XRestackWindows(**otk::display, wins, 2);
699 // if the window has a modal child, then raise it after us to put it on top
700 if (client->modalChild())
701 raiseWindow(client->modalChild());
703 changeStackingList(); // no need to do this twice!
706 void Screen::changeDesktop(long desktop)
708 if (!(desktop >= 0 && desktop < _num_desktops)) return;
710 printf("Moving to desktop %ld\n", desktop);
715 otk::Property::set(_info->rootWindow(),
716 otk::Property::atoms.net_current_desktop,
717 otk::Property::atoms.cardinal, _desktop);
719 if (old == _desktop) return;
721 ClientList::iterator it, end = clients.end();
722 for (it = clients.begin(); it != end; ++it) {
723 if ((*it)->desktop() == old) {
724 (*it)->frame->hide();
725 } else if ((*it)->desktop() == _desktop) {
726 (*it)->frame->show();
730 // force the callbacks to fire
731 if (!openbox->focusedClient())
732 openbox->setFocusedClient(0);
735 void Screen::changeNumDesktops(long num)
739 if (!(num > 0)) return;
741 // move windows on desktops that will no longer exist!
742 ClientList::iterator it, end = clients.end();
743 for (it = clients.begin(); it != end; ++it) {
744 int d = (*it)->desktop();
745 if (d >= num && !(d == (signed) 0xffffffff ||
746 d == Client::ICONIC_DESKTOP)) {
748 ce.xclient.type = ClientMessage;
749 ce.xclient.message_type = otk::Property::atoms.net_wm_desktop;
750 ce.xclient.display = **otk::display;
751 ce.xclient.window = (*it)->window();
752 ce.xclient.format = 32;
753 ce.xclient.data.l[0] = num - 1;
754 XSendEvent(**otk::display, _info->rootWindow(), False,
755 SubstructureNotifyMask | SubstructureRedirectMask, &ce);
760 otk::Property::set(_info->rootWindow(),
761 otk::Property::atoms.net_number_of_desktops,
762 otk::Property::atoms.cardinal, _num_desktops);
764 // set the viewport hint
765 unsigned long *viewport = new unsigned long[_num_desktops * 2];
766 memset(viewport, 0, sizeof(unsigned long) * _num_desktops * 2);
767 otk::Property::set(_info->rootWindow(),
768 otk::Property::atoms.net_desktop_viewport,
769 otk::Property::atoms.cardinal,
770 viewport, _num_desktops * 2);
773 // update the work area hint
776 // change our desktop if we're on one that no longer exists!
778 changeDesktop(num - 1);
782 void Screen::updateDesktopNames()
784 unsigned long num = (unsigned) -1;
786 if (!otk::Property::get(_info->rootWindow(),
787 otk::Property::atoms.net_desktop_names,
788 otk::Property::utf8, &num, &_desktop_names))
789 _desktop_names.clear();
790 while ((long)_desktop_names.size() < _num_desktops)
791 _desktop_names.push_back("Unnamed");
795 void Screen::setDesktopName(long i, const otk::ustring &name)
799 if (i >= _num_desktops) return;
801 otk::Property::StringVect newnames = _desktop_names;
803 otk::Property::set(_info->rootWindow(),
804 otk::Property::atoms.net_desktop_names,
805 otk::Property::utf8, newnames);
809 void Screen::installColormap(bool install) const
812 XInstallColormap(**otk::display, _info->colormap());
814 XUninstallColormap(**otk::display, _info->colormap());
818 void Screen::propertyHandler(const XPropertyEvent &e)
820 otk::EventHandler::propertyHandler(e);
822 // compress changes to a single property into a single change
824 while (XCheckTypedWindowEvent(**otk::display, _info->rootWindow(),
826 // XXX: it would be nice to compress ALL changes to a property, not just
827 // changes in a row without other props between.
828 if (ce.xproperty.atom != e.atom) {
829 XPutBackEvent(**otk::display, &ce);
834 if (e.atom == otk::Property::atoms.net_desktop_names)
835 updateDesktopNames();
839 void Screen::clientMessageHandler(const XClientMessageEvent &e)
841 otk::EventHandler::clientMessageHandler(e);
843 if (e.format != 32) return;
845 if (e.message_type == otk::Property::atoms.net_current_desktop) {
846 changeDesktop(e.data.l[0]);
847 } else if (e.message_type == otk::Property::atoms.net_number_of_desktops) {
848 changeNumDesktops(e.data.l[0]);
853 void Screen::mapRequestHandler(const XMapRequestEvent &e)
855 otk::EventHandler::mapRequestHandler(e);
858 printf("MapRequest for 0x%lx\n", e.window);
861 Client *c = openbox->findClient(e.window);
864 printf("DEBUG: MAP REQUEST CAUGHT IN SCREEN. IGNORED.\n");
867 manageWindow(e.window);