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
67 printf(_("Managing screen %d: visual 0x%lx, depth %d\n"),
68 _number, XVisualIDFromVisual(_info->visual()), _info->depth());
70 otk::Property::set(_info->rootWindow(), otk::Property::atoms.openbox_pid,
71 otk::Property::atoms.cardinal, (unsigned long) getpid());
73 // set the mouse cursor for the root window (the default cursor)
74 XDefineCursor(**otk::display, _info->rootWindow(),
75 openbox->cursors().session);
77 // XXX: initialize the screen's style
79 otk::ustring stylepath;
80 python_get_string("theme", &stylepath);
81 otk::Configuration sconfig(false);
82 sconfig.setFile(otk::expandTilde(stylepath.c_str()));
83 if (!sconfig.load()) {
84 sconfig.setFile(otk::expandTilde(DEFAULTSTYLE));
85 if (!sconfig.load()) {
86 printf(_("Unable to load default style: %s. Aborting.\n"), DEFAULTSTYLE);
92 otk::display->renderControl(_number)->drawRoot(*_style.rootColor());
94 // set up notification of netwm support
95 changeSupportedAtoms();
97 // Set the netwm properties for geometry
98 unsigned long geometry[] = { _info->width(),
100 otk::Property::set(_info->rootWindow(),
101 otk::Property::atoms.net_desktop_geometry,
102 otk::Property::atoms.cardinal, geometry, 2);
104 // Set the net_desktop_names property
105 std::vector<otk::ustring> names;
106 python_get_stringlist("desktop_names", &names);
107 otk::Property::set(_info->rootWindow(),
108 otk::Property::atoms.net_desktop_names,
109 otk::Property::utf8, names);
110 // the above set() will cause the updateDesktopNames to fire right away so
111 // we have a list of desktop names
115 if (!python_get_long("number_of_desktops", &_num_desktops))
117 changeNumDesktops(_num_desktops); // set the hint
119 changeDesktop(0); // set the hint
121 // create the window which gets focus when no clients get it
122 XSetWindowAttributes attr;
123 attr.override_redirect = true;
124 _focuswindow = XCreateWindow(**otk::display, _info->rootWindow(),
125 -100, -100, 1, 1, 0, 0, InputOnly,
126 _info->visual(), CWOverrideRedirect, &attr);
127 XMapRaised(**otk::display, _focuswindow);
129 // these may be further updated if any pre-existing windows are found in
130 // the manageExising() function
131 changeClientList(); // initialize the client lists, which will be empty
132 calcArea(); // initialize the available working area
134 // register this class as the event handler for the root window
135 openbox->registerHandler(_info->rootWindow(), this);
137 // call the python Startup callbacks
138 EventData data(_number, 0, EventAction::Startup, 0);
139 openbox->bindings()->fireEvent(&data);
145 if (! _managed) return;
147 XSelectInput(**otk::display, _info->rootWindow(), NoEventMask);
149 // unmanage all windows
150 while (!clients.empty())
151 unmanageWindow(clients.front());
153 // call the python Shutdown callbacks
154 EventData data(_number, 0, EventAction::Shutdown, 0);
155 openbox->bindings()->fireEvent(&data);
157 XDestroyWindow(**otk::display, _focuswindow);
158 XDestroyWindow(**otk::display, _supportwindow);
162 void Screen::manageExisting()
164 unsigned int i, j, nchild;
165 Window r, p, *children;
166 XQueryTree(**otk::display, _info->rootWindow(), &r, &p,
169 // preen the window list of all icon windows... for better dockapp support
170 for (i = 0; i < nchild; i++) {
171 if (children[i] == None) continue;
173 XWMHints *wmhints = XGetWMHints(**otk::display,
177 if ((wmhints->flags & IconWindowHint) &&
178 (wmhints->icon_window != children[i])) {
179 for (j = 0; j < nchild; j++) {
180 if (children[j] == wmhints->icon_window) {
191 // manage shown windows
192 for (i = 0; i < nchild; ++i) {
193 if (children[i] == None)
196 XWindowAttributes attrib;
197 if (XGetWindowAttributes(**otk::display, children[i], &attrib)) {
198 if (attrib.override_redirect) continue;
200 if (attrib.map_state != IsUnmapped) {
201 manageWindow(children[i]);
210 void Screen::updateStrut()
212 _strut.left = _strut.right = _strut.top = _strut.bottom = 0;
214 ClientList::iterator it, end = clients.end();
215 for (it = clients.begin(); it != end; ++it) {
216 const otk::Strut &s = (*it)->strut();
217 _strut.left = std::max(_strut.left, s.left);
218 _strut.right = std::max(_strut.right, s.right);
219 _strut.top = std::max(_strut.top, s.top);
220 _strut.bottom = std::max(_strut.bottom, s.bottom);
226 void Screen::calcArea()
228 otk::Rect old_area = _area;
232 // reset to the full areas
233 if (isXineramaActive())
234 xineramaUsableArea = getXineramaAreas();
238 _area.setRect(_strut.left, _strut.top,
239 _info->width() - (_strut.left + _strut.right),
240 _info->height() - (_strut.top + _strut.bottom));
244 if (isXineramaActive()) {
245 // keep each of the ximerama-defined areas inside the strut
246 RectList::iterator xit, xend = xineramaUsableArea.end();
247 for (xit = xineramaUsableArea.begin(); xit != xend; ++xit) {
248 if (xit->x() < usableArea.x()) {
249 xit->setX(usableArea.x());
250 xit->setWidth(xit->width() - usableArea.x());
252 if (xit->y() < usableArea.y()) {
253 xit->setY(usableArea.y());
254 xit->setHeight(xit->height() - usableArea.y());
256 if (xit->x() + xit->width() > usableArea.width())
257 xit->setWidth(usableArea.width() - xit->x());
258 if (xit->y() + xit->height() > usableArea.height())
259 xit->setHeight(usableArea.height() - xit->y());
265 if (old_area != _area) {
266 // the area has changed, adjust all the maximized windows
267 ClientList::iterator it, end = clients.end();
268 for (it = clients.begin(); it != end; ++it)
276 void Screen::changeSupportedAtoms()
278 // create the netwm support window
279 _supportwindow = XCreateSimpleWindow(**otk::display,
281 0, 0, 1, 1, 0, 0, 0);
283 // set supporting window
284 otk::Property::set(_info->rootWindow(),
285 otk::Property::atoms.net_supporting_wm_check,
286 otk::Property::atoms.window, _supportwindow);
288 //set properties on the supporting window
289 otk::Property::set(_supportwindow, otk::Property::atoms.net_wm_name,
290 otk::Property::utf8, "Openbox");
291 otk::Property::set(_supportwindow,
292 otk::Property::atoms.net_supporting_wm_check,
293 otk::Property::atoms.window, _supportwindow);
297 otk::Property::atoms.net_current_desktop,
298 otk::Property::atoms.net_number_of_desktops,
299 otk::Property::atoms.net_desktop_geometry,
300 otk::Property::atoms.net_desktop_viewport,
301 otk::Property::atoms.net_active_window,
302 otk::Property::atoms.net_workarea,
303 otk::Property::atoms.net_client_list,
304 otk::Property::atoms.net_client_list_stacking,
305 otk::Property::atoms.net_desktop_names,
306 otk::Property::atoms.net_close_window,
307 otk::Property::atoms.net_wm_name,
308 otk::Property::atoms.net_wm_visible_name,
309 otk::Property::atoms.net_wm_icon_name,
310 otk::Property::atoms.net_wm_visible_icon_name,
312 otk::Property::atoms.net_wm_desktop,
314 otk::Property::atoms.net_wm_strut,
315 otk::Property::atoms.net_wm_window_type,
316 otk::Property::atoms.net_wm_window_type_desktop,
317 otk::Property::atoms.net_wm_window_type_dock,
318 otk::Property::atoms.net_wm_window_type_toolbar,
319 otk::Property::atoms.net_wm_window_type_menu,
320 otk::Property::atoms.net_wm_window_type_utility,
321 otk::Property::atoms.net_wm_window_type_splash,
322 otk::Property::atoms.net_wm_window_type_dialog,
323 otk::Property::atoms.net_wm_window_type_normal,
325 otk::Property::atoms.net_wm_moveresize,
326 otk::Property::atoms.net_wm_moveresize_size_topleft,
327 otk::Property::atoms.net_wm_moveresize_size_topright,
328 otk::Property::atoms.net_wm_moveresize_size_bottomleft,
329 otk::Property::atoms.net_wm_moveresize_size_bottomright,
330 otk::Property::atoms.net_wm_moveresize_move,
332 otk::Property::atoms.net_wm_allowed_actions,
333 otk::Property::atoms.net_wm_action_move,
334 otk::Property::atoms.net_wm_action_resize,
335 otk::Property::atoms.net_wm_action_minimize,
336 otk::Property::atoms.net_wm_action_shade,
337 /* otk::Property::atoms.net_wm_action_stick,*/
338 otk::Property::atoms.net_wm_action_maximize_horz,
339 otk::Property::atoms.net_wm_action_maximize_vert,
340 otk::Property::atoms.net_wm_action_fullscreen,
341 otk::Property::atoms.net_wm_action_change_desktop,
342 otk::Property::atoms.net_wm_action_close,
344 otk::Property::atoms.net_wm_state,
345 otk::Property::atoms.net_wm_state_modal,
346 otk::Property::atoms.net_wm_state_maximized_vert,
347 otk::Property::atoms.net_wm_state_maximized_horz,
348 otk::Property::atoms.net_wm_state_shaded,
349 otk::Property::atoms.net_wm_state_skip_taskbar,
350 otk::Property::atoms.net_wm_state_skip_pager,
351 otk::Property::atoms.net_wm_state_hidden,
352 otk::Property::atoms.net_wm_state_fullscreen,
353 otk::Property::atoms.net_wm_state_above,
354 otk::Property::atoms.net_wm_state_below,
356 const int num_supported = sizeof(supported)/sizeof(Atom);
358 otk::Property::set(_info->rootWindow(), otk::Property::atoms.net_supported,
359 otk::Property::atoms.atom, supported, num_supported);
363 void Screen::changeClientList()
366 unsigned int size = clients.size();
368 // create an array of the window ids
372 windows = new Window[size];
374 ClientList::const_iterator it = clients.begin();
375 const ClientList::const_iterator end = clients.end();
376 for (; it != end; ++it, ++win_it)
377 *win_it = (*it)->window();
379 windows = (Window*) 0;
381 otk::Property::set(_info->rootWindow(), otk::Property::atoms.net_client_list,
382 otk::Property::atoms.window, windows, size);
387 changeStackingList();
391 void Screen::changeStackingList()
394 unsigned int size = _stacking.size();
396 assert(size == clients.size()); // just making sure.. :)
399 // create an array of the window ids (from bottom to top, reverse order!)
403 windows = new Window[size];
405 ClientList::const_reverse_iterator it = _stacking.rbegin();
406 const ClientList::const_reverse_iterator end = _stacking.rend();
407 for (; it != end; ++it, ++win_it)
408 *win_it = (*it)->window();
410 windows = (Window*) 0;
412 otk::Property::set(_info->rootWindow(),
413 otk::Property::atoms.net_client_list_stacking,
414 otk::Property::atoms.window, windows, size);
421 void Screen::changeWorkArea() {
422 unsigned long *dims = new unsigned long[4 * _num_desktops];
423 for (long i = 0; i < _num_desktops; ++i) {
424 dims[(i * 4) + 0] = _area.x();
425 dims[(i * 4) + 1] = _area.y();
426 dims[(i * 4) + 2] = _area.width();
427 dims[(i * 4) + 3] = _area.height();
429 otk::Property::set(_info->rootWindow(), otk::Property::atoms.net_workarea,
430 otk::Property::atoms.cardinal, dims, 4 * _num_desktops);
435 void Screen::manageWindow(Window window)
439 XSetWindowAttributes attrib_set;
441 XWindowAttributes attrib;
443 otk::display->grab();
445 // check if it has already been unmapped by the time we started mapping
446 // the grab does a sync so we don't have to here
447 if (XCheckTypedWindowEvent(**otk::display, window, DestroyNotify, &e) ||
448 XCheckTypedWindowEvent(**otk::display, window, UnmapNotify, &e)) {
449 XPutBackEvent(**otk::display, &e);
451 otk::display->ungrab();
452 return; // don't manage it
455 if (!XGetWindowAttributes(**otk::display, window, &attrib) ||
456 attrib.override_redirect) {
457 otk::display->ungrab();
458 return; // don't manage it
461 // is the window a docking app
462 if ((wmhint = XGetWMHints(**otk::display, window))) {
463 if ((wmhint->flags & StateHint) &&
464 wmhint->initial_state == WithdrawnState) {
465 //slit->addClient(w); // XXX: make dock apps work!
467 otk::display->ungrab();
474 // choose the events we want to receive on the CLIENT window
475 attrib_set.event_mask = Client::event_mask;
476 attrib_set.do_not_propagate_mask = Client::no_propagate_mask;
477 XChangeWindowAttributes(**otk::display, window,
478 CWEventMask|CWDontPropagate, &attrib_set);
480 // create the Client class, which gets all of the hints on the window
481 client = new Client(_number, window);
482 // register for events
483 openbox->registerHandler(window, client);
484 // add to the wm's map
485 openbox->addClient(window, client);
487 // we dont want a border on the client
488 client->toggleClientBorder(false);
490 // specify that if we exit, the window should not be destroyed and should be
491 // reparented back to root automatically
492 XChangeSaveSet(**otk::display, window, SetModeInsert);
494 // create the decoration frame for the client window
495 client->frame = new Frame(client, &_style);
496 // register the plate for events (map req's)
497 // this involves removing itself from the handler list first, since it is
498 // auto added to the list, being a widget. we won't get any events on the
499 // plate except for events for the client (SubstructureRedirectMask)
500 openbox->clearHandler(client->frame->plate());
501 openbox->registerHandler(client->frame->plate(), client);
503 // add to the wm's map
504 openbox->addClient(client->frame->window(), client);
505 openbox->addClient(client->frame->plate(), client);
506 openbox->addClient(client->frame->titlebar(), client);
507 openbox->addClient(client->frame->label(), client);
508 openbox->addClient(client->frame->button_max(), client);
509 openbox->addClient(client->frame->button_iconify(), client);
510 openbox->addClient(client->frame->button_alldesk(), client);
511 openbox->addClient(client->frame->button_close(), client);
512 openbox->addClient(client->frame->handle(), client);
513 openbox->addClient(client->frame->grip_left(), client);
514 openbox->addClient(client->frame->grip_right(), client);
516 // reparent the client to the frame
517 client->frame->grabClient();
519 if (openbox->state() != Openbox::State_Starting) {
520 // position the window intelligenty .. hopefully :)
521 // call the python PLACEWINDOW binding
522 EventData data(_number, client, EventAction::PlaceWindow, 0);
523 openbox->bindings()->fireEvent(&data);
526 EventData ddata(_number, client, EventAction::DisplayingWindow, 0);
527 openbox->bindings()->fireEvent(&ddata);
529 // if on the current desktop.. (or all desktops)
530 if (client->desktop() == _desktop ||
531 client->desktop() == (signed)0xffffffff) {
532 client->frame->show();
535 client->applyStartupState();
537 otk::display->ungrab();
539 // add to the screen's list
540 clients.push_back(client);
541 // once the client is in the list, update our strut to include the new
542 // client's (it is good that this happens after window placement!)
544 // this puts into the stacking order, then raises it
545 _stacking.push_back(client);
547 // update the root properties
550 openbox->bindings()->grabButtons(true, client);
552 EventData ndata(_number, client, EventAction::NewWindow, 0);
553 openbox->bindings()->fireEvent(&ndata);
556 printf("Managed window 0x%lx frame 0x%lx\n",
557 window, client->frame->window());
562 void Screen::unmanageWindow(Client *client)
564 Frame *frame = client->frame;
566 // call the python CLOSEWINDOW binding
567 EventData data(_number, client, EventAction::CloseWindow, 0);
568 openbox->bindings()->fireEvent(&data);
570 openbox->bindings()->grabButtons(false, client);
572 // remove from the wm's map
573 openbox->removeClient(client->window());
574 openbox->removeClient(frame->window());
575 openbox->removeClient(frame->plate());
576 openbox->removeClient(frame->titlebar());
577 openbox->removeClient(frame->label());
578 openbox->removeClient(frame->button_max());
579 openbox->removeClient(frame->button_iconify());
580 openbox->removeClient(frame->button_alldesk());
581 openbox->removeClient(frame->button_close());
582 openbox->removeClient(frame->handle());
583 openbox->removeClient(frame->grip_left());
584 openbox->removeClient(frame->grip_right());
585 // unregister for handling events
586 openbox->clearHandler(client->window());
588 // remove the window from our save set
589 XChangeSaveSet(**otk::display, client->window(), SetModeDelete);
591 // we dont want events no more
592 XSelectInput(**otk::display, client->window(), NoEventMask);
596 // give the client its border back
597 client->toggleClientBorder(true);
599 // reparent the window out of the frame
600 frame->releaseClient();
603 Window framewin = client->frame->window();
605 delete client->frame;
608 // remove from the stacking order
609 _stacking.remove(client);
611 // remove from the screen's list
612 clients.remove(client);
614 // once the client is out of the list, update our strut to remove it's
618 // unset modal before dropping our focus
619 client->setModal(false);
621 // unfocus the client (calls the focus callbacks)
625 printf("Unmanaged window 0x%lx frame 0x%lx\n", client->window(), framewin);
630 // update the root properties
634 void Screen::lowerWindow(Client *client)
636 Window wins[2]; // only ever restack 2 windows.
638 assert(!_stacking.empty()); // this would be bad
640 ClientList::iterator it = --_stacking.end();
641 const ClientList::iterator end = _stacking.begin();
643 if (client->modal() && client->transientFor()) {
644 // don't let a modal window lower below its transient_for
645 it = std::find(_stacking.begin(), _stacking.end(), client->transientFor());
646 assert(it != _stacking.end());
648 wins[0] = (it == _stacking.begin() ? _focuswindow :
649 ((*(--ClientList::const_iterator(it)))->frame->window()));
650 wins[1] = client->frame->window();
651 if (wins[0] == wins[1]) return; // already right above the window
653 _stacking.remove(client);
654 _stacking.insert(it, client);
656 for (; it != end && (*it)->layer() < client->layer(); --it);
657 if (*it == client) return; // already the bottom, return
659 wins[0] = (*it)->frame->window();
660 wins[1] = client->frame->window();
662 _stacking.remove(client);
663 _stacking.insert(++it, client);
666 XRestackWindows(**otk::display, wins, 2);
667 changeStackingList();
670 void Screen::raiseWindow(Client *client)
672 Window wins[2]; // only ever restack 2 windows.
674 assert(!_stacking.empty()); // this would be bad
676 // remove the client before looking so we can't run into ourselves
677 _stacking.remove(client);
679 ClientList::iterator it = _stacking.begin();
680 const ClientList::iterator end = _stacking.end();
682 // the stacking list is from highest to lowest
683 for (; it != end && (*it)->layer() > client->layer(); ++it);
686 if our new position is the top, we want to stack under the _focuswindow
687 otherwise, we want to stack under the previous window in the stack.
689 wins[0] = (it == _stacking.begin() ? _focuswindow :
690 ((*(--ClientList::const_iterator(it)))->frame->window()));
691 wins[1] = client->frame->window();
693 _stacking.insert(it, client);
695 XRestackWindows(**otk::display, wins, 2);
697 // if the window has a modal child, then raise it after us to put it on top
698 if (client->modalChild())
699 raiseWindow(client->modalChild());
701 changeStackingList(); // no need to do this twice!
704 void Screen::changeDesktop(long desktop)
706 if (!(desktop >= 0 && desktop < _num_desktops)) return;
708 printf("Moving to desktop %ld\n", desktop);
713 otk::Property::set(_info->rootWindow(),
714 otk::Property::atoms.net_current_desktop,
715 otk::Property::atoms.cardinal, _desktop);
717 if (old == _desktop) return;
719 ClientList::iterator it, end = clients.end();
720 for (it = clients.begin(); it != end; ++it) {
721 if ((*it)->desktop() == old) {
722 (*it)->frame->hide();
723 } else if ((*it)->desktop() == _desktop) {
724 (*it)->frame->show();
728 // force the callbacks to fire
729 if (!openbox->focusedClient())
730 openbox->setFocusedClient(0);
733 void Screen::changeNumDesktops(long num)
737 if (!(num > 0)) return;
739 // move windows on desktops that will no longer exist!
740 ClientList::iterator it, end = clients.end();
741 for (it = clients.begin(); it != end; ++it) {
742 int d = (*it)->desktop();
743 if (d >= num && !(d == (signed) 0xffffffff ||
744 d == Client::ICONIC_DESKTOP)) {
746 ce.xclient.type = ClientMessage;
747 ce.xclient.message_type = otk::Property::atoms.net_wm_desktop;
748 ce.xclient.display = **otk::display;
749 ce.xclient.window = (*it)->window();
750 ce.xclient.format = 32;
751 ce.xclient.data.l[0] = num - 1;
752 XSendEvent(**otk::display, _info->rootWindow(), False,
753 SubstructureNotifyMask | SubstructureRedirectMask, &ce);
758 otk::Property::set(_info->rootWindow(),
759 otk::Property::atoms.net_number_of_desktops,
760 otk::Property::atoms.cardinal, _num_desktops);
762 // set the viewport hint
763 unsigned long *viewport = new unsigned long[_num_desktops * 2];
764 memset(viewport, 0, sizeof(unsigned long) * _num_desktops * 2);
765 otk::Property::set(_info->rootWindow(),
766 otk::Property::atoms.net_desktop_viewport,
767 otk::Property::atoms.cardinal,
768 viewport, _num_desktops * 2);
771 // update the work area hint
774 // change our desktop if we're on one that no longer exists!
776 changeDesktop(num - 1);
780 void Screen::updateDesktopNames()
782 unsigned long num = (unsigned) -1;
784 if (!otk::Property::get(_info->rootWindow(),
785 otk::Property::atoms.net_desktop_names,
786 otk::Property::utf8, &num, &_desktop_names))
787 _desktop_names.clear();
788 while ((long)_desktop_names.size() < _num_desktops)
789 _desktop_names.push_back("Unnamed");
793 void Screen::setDesktopName(long i, const otk::ustring &name)
797 if (i >= _num_desktops) return;
799 otk::Property::StringVect newnames = _desktop_names;
801 otk::Property::set(_info->rootWindow(),
802 otk::Property::atoms.net_desktop_names,
803 otk::Property::utf8, newnames);
807 void Screen::installColormap(bool install) const
810 XInstallColormap(**otk::display, _info->colormap());
812 XUninstallColormap(**otk::display, _info->colormap());
816 void Screen::propertyHandler(const XPropertyEvent &e)
818 otk::EventHandler::propertyHandler(e);
820 // compress changes to a single property into a single change
822 while (XCheckTypedWindowEvent(**otk::display, _info->rootWindow(),
824 // XXX: it would be nice to compress ALL changes to a property, not just
825 // changes in a row without other props between.
826 if (ce.xproperty.atom != e.atom) {
827 XPutBackEvent(**otk::display, &ce);
832 if (e.atom == otk::Property::atoms.net_desktop_names)
833 updateDesktopNames();
837 void Screen::clientMessageHandler(const XClientMessageEvent &e)
839 otk::EventHandler::clientMessageHandler(e);
841 if (e.format != 32) return;
843 if (e.message_type == otk::Property::atoms.net_current_desktop) {
844 changeDesktop(e.data.l[0]);
845 } else if (e.message_type == otk::Property::atoms.net_number_of_desktops) {
846 changeNumDesktops(e.data.l[0]);
851 void Screen::mapRequestHandler(const XMapRequestEvent &e)
853 otk::EventHandler::mapRequestHandler(e);
856 printf("MapRequest for 0x%lx\n", e.window);
859 Client *c = openbox->findClient(e.window);
862 printf("DEBUG: MAP REQUEST CAUGHT IN SCREEN. IGNORED.\n");
865 manageWindow(e.window);