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"
37 static int anotherWMRunning(Display
*display
, XErrorEvent
*) {
38 printf(_("Another window manager already running on display %s.\n"),
39 DisplayString(display
));
48 OBScreen::OBScreen(int screen
)
49 : OBWidget(OBWidget::Type_Root
),
52 assert(screen
>= 0); assert(screen
< ScreenCount(otk::OBDisplay::display
));
53 _info
= otk::OBDisplay::screenInfo(screen
);
56 XErrorHandler old
= XSetErrorHandler(::anotherWMRunning
);
57 XSelectInput(otk::OBDisplay::display
, _info
->rootWindow(),
58 OBScreen::event_mask
);
59 XSync(otk::OBDisplay::display
, false);
60 XSetErrorHandler(old
);
62 _managed
= !::running
;
63 if (! _managed
) return; // was unable to manage the screen
65 printf(_("Managing screen %d: visual 0x%lx, depth %d\n"),
66 _number
, XVisualIDFromVisual(_info
->visual()), _info
->depth());
68 Openbox::instance
->property()->set(_info
->rootWindow(),
69 otk::OBProperty::openbox_pid
,
70 otk::OBProperty::Atom_Cardinal
,
71 (unsigned long) getpid());
73 // set the mouse cursor for the root window (the default cursor)
74 XDefineCursor(otk::OBDisplay::display
, _info
->rootWindow(),
75 Openbox::instance
->cursors().session
);
77 // initialize the shit that is used for all drawing on the screen
78 _image_control
= new otk::BImageControl(Openbox::instance
->timerManager(),
80 _image_control
->installRootColormap();
81 _root_cmap_installed
= True
;
83 // initialize the screen's style
84 _style
.setImageControl(_image_control
);
85 std::string stylepath
;
86 python_get_string("theme", &stylepath
);
87 otk::Configuration
sconfig(false);
88 sconfig
.setFile(otk::expandTilde(stylepath
));
89 if (!sconfig
.load()) {
90 sconfig
.setFile(otk::expandTilde(DEFAULTSTYLE
));
91 if (!sconfig
.load()) {
92 printf(_("Unable to load default style: %s. Aborting.\n"), DEFAULTSTYLE
);
98 // set up notification of netwm support
99 changeSupportedAtoms();
101 // Set the netwm properties for geometry
102 unsigned long geometry
[] = { _info
->width(),
104 Openbox::instance
->property()->set(_info
->rootWindow(),
105 otk::OBProperty::net_desktop_geometry
,
106 otk::OBProperty::Atom_Cardinal
,
109 // Set the net_desktop_names property
110 std::vector
<std::string
> names
;
111 python_get_stringlist("desktop_names", &names
);
112 Openbox::instance
->property()->set(_info
->rootWindow(),
113 otk::OBProperty::net_desktop_names
,
114 otk::OBProperty::utf8
,
116 // the above set() will cause the updateDesktopNames to fire right away so
117 // we have a list of desktop names
119 if (!python_get_long("number_of_desktops", &_num_desktops
))
121 changeNumDesktops(_num_desktops
); // set the hint
124 changeDesktop(0); // set the hint
126 // create the window which gets focus when no clients get it
127 XSetWindowAttributes attr
;
128 attr
.override_redirect
= true;
129 _focuswindow
= XCreateWindow(otk::OBDisplay::display
, _info
->rootWindow(),
130 -100, -100, 1, 1, 0, 0, InputOnly
,
131 _info
->visual(), CWOverrideRedirect
, &attr
);
132 XMapWindow(otk::OBDisplay::display
, _focuswindow
);
134 // these may be further updated if any pre-existing windows are found in
135 // the manageExising() function
136 changeClientList(); // initialize the client lists, which will be empty
137 calcArea(); // initialize the available working area
139 // register this class as the event handler for the root window
140 Openbox::instance
->registerHandler(_info
->rootWindow(), this);
142 // call the python Startup callbacks
143 EventData
data(_number
, 0, EventShutdown
, 0);
144 Openbox::instance
->bindings()->fireEvent(&data
);
148 OBScreen::~OBScreen()
150 if (! _managed
) return;
152 XSelectInput(otk::OBDisplay::display
, _info
->rootWindow(), NoEventMask
);
154 // unmanage all windows
155 while (!clients
.empty())
156 unmanageWindow(clients
.front());
158 // call the python Shutdown callbacks
159 EventData
data(_number
, 0, EventShutdown
, 0);
160 Openbox::instance
->bindings()->fireEvent(&data
);
162 XDestroyWindow(otk::OBDisplay::display
, _focuswindow
);
163 XDestroyWindow(otk::OBDisplay::display
, _supportwindow
);
165 delete _image_control
;
169 void OBScreen::manageExisting()
171 unsigned int i
, j
, nchild
;
172 Window r
, p
, *children
;
173 XQueryTree(otk::OBDisplay::display
, _info
->rootWindow(), &r
, &p
,
176 // preen the window list of all icon windows... for better dockapp support
177 for (i
= 0; i
< nchild
; i
++) {
178 if (children
[i
] == None
) continue;
180 XWMHints
*wmhints
= XGetWMHints(otk::OBDisplay::display
,
184 if ((wmhints
->flags
& IconWindowHint
) &&
185 (wmhints
->icon_window
!= children
[i
])) {
186 for (j
= 0; j
< nchild
; j
++) {
187 if (children
[j
] == wmhints
->icon_window
) {
198 // manage shown windows
199 for (i
= 0; i
< nchild
; ++i
) {
200 if (children
[i
] == None
)
203 XWindowAttributes attrib
;
204 if (XGetWindowAttributes(otk::OBDisplay::display
, children
[i
], &attrib
)) {
205 if (attrib
.override_redirect
) continue;
207 if (attrib
.map_state
!= IsUnmapped
) {
208 manageWindow(children
[i
]);
217 void OBScreen::updateStrut()
219 _strut
.left
= _strut
.right
= _strut
.top
= _strut
.bottom
= 0;
221 OBClient::List::iterator it
, end
= clients
.end();
222 for (it
= clients
.begin(); it
!= end
; ++it
) {
223 const otk::Strut
&s
= (*it
)->strut();
224 _strut
.left
= std::max(_strut
.left
, s
.left
);
225 _strut
.right
= std::max(_strut
.right
, s
.right
);
226 _strut
.top
= std::max(_strut
.top
, s
.top
);
227 _strut
.bottom
= std::max(_strut
.bottom
, s
.bottom
);
233 void OBScreen::calcArea()
235 otk::Rect old_area
= _area
;
239 // reset to the full areas
240 if (isXineramaActive())
241 xineramaUsableArea = getXineramaAreas();
245 _area
.setRect(_strut
.left
, _strut
.top
,
246 _info
->width() - (_strut
.left
+ _strut
.right
),
247 _info
->height() - (_strut
.top
+ _strut
.bottom
));
251 if (isXineramaActive()) {
252 // keep each of the ximerama-defined areas inside the strut
253 RectList::iterator xit, xend = xineramaUsableArea.end();
254 for (xit = xineramaUsableArea.begin(); xit != xend; ++xit) {
255 if (xit->x() < usableArea.x()) {
256 xit->setX(usableArea.x());
257 xit->setWidth(xit->width() - usableArea.x());
259 if (xit->y() < usableArea.y()) {
260 xit->setY(usableArea.y());
261 xit->setHeight(xit->height() - usableArea.y());
263 if (xit->x() + xit->width() > usableArea.width())
264 xit->setWidth(usableArea.width() - xit->x());
265 if (xit->y() + xit->height() > usableArea.height())
266 xit->setHeight(usableArea.height() - xit->y());
272 if (old_area
!= _area
)
273 // XXX: re-maximize windows
279 void OBScreen::changeSupportedAtoms()
281 // create the netwm support window
282 _supportwindow
= XCreateSimpleWindow(otk::OBDisplay::display
,
284 0, 0, 1, 1, 0, 0, 0);
286 // set supporting window
287 Openbox::instance
->property()->set(_info
->rootWindow(),
288 otk::OBProperty::net_supporting_wm_check
,
289 otk::OBProperty::Atom_Window
,
292 //set properties on the supporting window
293 Openbox::instance
->property()->set(_supportwindow
,
294 otk::OBProperty::net_wm_name
,
295 otk::OBProperty::utf8
,
297 Openbox::instance
->property()->set(_supportwindow
,
298 otk::OBProperty::net_supporting_wm_check
,
299 otk::OBProperty::Atom_Window
,
304 otk::OBProperty::net_current_desktop
,
305 otk::OBProperty::net_number_of_desktops
,
306 otk::OBProperty::net_desktop_geometry
,
307 otk::OBProperty::net_desktop_viewport
,
308 otk::OBProperty::net_active_window
,
309 otk::OBProperty::net_workarea
,
310 otk::OBProperty::net_client_list
,
311 otk::OBProperty::net_client_list_stacking
,
312 otk::OBProperty::net_desktop_names
,
313 otk::OBProperty::net_close_window
,
314 otk::OBProperty::net_wm_name
,
315 otk::OBProperty::net_wm_visible_name
,
316 otk::OBProperty::net_wm_icon_name
,
317 otk::OBProperty::net_wm_visible_icon_name
,
319 otk::OBProperty::net_wm_desktop,
321 otk::OBProperty::net_wm_strut
,
322 otk::OBProperty::net_wm_window_type
,
323 otk::OBProperty::net_wm_window_type_desktop
,
324 otk::OBProperty::net_wm_window_type_dock
,
325 otk::OBProperty::net_wm_window_type_toolbar
,
326 otk::OBProperty::net_wm_window_type_menu
,
327 otk::OBProperty::net_wm_window_type_utility
,
328 otk::OBProperty::net_wm_window_type_splash
,
329 otk::OBProperty::net_wm_window_type_dialog
,
330 otk::OBProperty::net_wm_window_type_normal
,
332 otk::OBProperty::net_wm_moveresize,
333 otk::OBProperty::net_wm_moveresize_size_topleft,
334 otk::OBProperty::net_wm_moveresize_size_topright,
335 otk::OBProperty::net_wm_moveresize_size_bottomleft,
336 otk::OBProperty::net_wm_moveresize_size_bottomright,
337 otk::OBProperty::net_wm_moveresize_move,
340 otk::OBProperty::net_wm_allowed_actions,
341 otk::OBProperty::net_wm_action_move,
342 otk::OBProperty::net_wm_action_resize,
343 otk::OBProperty::net_wm_action_shade,
344 otk::OBProperty::net_wm_action_maximize_horz,
345 otk::OBProperty::net_wm_action_maximize_vert,
346 otk::OBProperty::net_wm_action_change_desktop,
347 otk::OBProperty::net_wm_action_close,
349 otk::OBProperty::net_wm_state
,
350 otk::OBProperty::net_wm_state_modal
,
351 otk::OBProperty::net_wm_state_maximized_vert
,
352 otk::OBProperty::net_wm_state_maximized_horz
,
353 otk::OBProperty::net_wm_state_shaded
,
354 otk::OBProperty::net_wm_state_skip_taskbar
,
355 otk::OBProperty::net_wm_state_skip_pager
,
356 otk::OBProperty::net_wm_state_hidden
,
357 otk::OBProperty::net_wm_state_fullscreen
,
358 otk::OBProperty::net_wm_state_above
,
359 otk::OBProperty::net_wm_state_below
,
361 const int num_supported
= sizeof(supported
)/sizeof(Atom
);
363 // convert to the atom values
364 for (int i
= 0; i
< num_supported
; ++i
)
366 Openbox::instance
->property()->atom((otk::OBProperty::Atoms
)supported
[i
]);
368 Openbox::instance
->property()->set(_info
->rootWindow(),
369 otk::OBProperty::net_supported
,
370 otk::OBProperty::Atom_Atom
,
371 supported
, num_supported
);
375 void OBScreen::changeClientList()
378 unsigned int size
= clients
.size();
380 // create an array of the window ids
384 windows
= new Window
[size
];
386 OBClient::List::const_iterator it
= clients
.begin();
387 const OBClient::List::const_iterator end
= clients
.end();
388 for (; it
!= end
; ++it
, ++win_it
)
389 *win_it
= (*it
)->window();
391 windows
= (Window
*) 0;
393 Openbox::instance
->property()->set(_info
->rootWindow(),
394 otk::OBProperty::net_client_list
,
395 otk::OBProperty::Atom_Window
,
401 changeStackingList();
405 void OBScreen::changeStackingList()
408 unsigned int size
= _stacking
.size();
410 assert(size
== clients
.size()); // just making sure.. :)
413 // create an array of the window ids
417 windows
= new Window
[size
];
419 OBClient::List::const_iterator it
= _stacking
.begin();
420 const OBClient::List::const_iterator end
= _stacking
.end();
421 for (; it
!= end
; ++it
, ++win_it
)
422 *win_it
= (*it
)->window();
424 windows
= (Window
*) 0;
426 Openbox::instance
->property()->set(_info
->rootWindow(),
427 otk::OBProperty::net_client_list_stacking
,
428 otk::OBProperty::Atom_Window
,
436 void OBScreen::changeWorkArea() {
437 unsigned long *dims
= new unsigned long[4 * _num_desktops
];
438 for (long i
= 0; i
< _num_desktops
; ++i
) {
439 // XXX: this could be different for each workspace
440 dims
[(i
* 4) + 0] = _area
.x();
441 dims
[(i
* 4) + 1] = _area
.y();
442 dims
[(i
* 4) + 2] = _area
.width();
443 dims
[(i
* 4) + 3] = _area
.height();
445 Openbox::instance
->property()->set(_info
->rootWindow(),
446 otk::OBProperty::net_workarea
,
447 otk::OBProperty::Atom_Cardinal
,
448 dims
, 4 * _num_desktops
);
453 void OBScreen::manageWindow(Window window
)
455 OBClient
*client
= 0;
457 XSetWindowAttributes attrib_set
;
459 otk::OBDisplay::grab();
461 // is the window a docking app
462 if ((wmhint
= XGetWMHints(otk::OBDisplay::display
, window
))) {
463 if ((wmhint
->flags
& StateHint
) &&
464 wmhint
->initial_state
== WithdrawnState
) {
465 //slit->addClient(w); // XXX: make dock apps work!
466 otk::OBDisplay::ungrab();
474 // choose the events we want to receive on the CLIENT window
475 attrib_set
.event_mask
= OBClient::event_mask
;
476 attrib_set
.do_not_propagate_mask
= OBClient::no_propagate_mask
;
477 XChangeWindowAttributes(otk::OBDisplay::display
, window
,
478 CWEventMask
|CWDontPropagate
, &attrib_set
);
480 // create the OBClient class, which gets all of the hints on the window
481 client
= new OBClient(_number
, window
);
482 // register for events
483 Openbox::instance
->registerHandler(window
, client
);
484 // add to the wm's map
485 Openbox::instance
->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::OBDisplay::display
, window
, SetModeInsert
);
494 if (!(Openbox::instance
->state() == Openbox::State_Starting
||
495 client
->positionRequested())) {
496 // position the window intelligenty .. hopefully :)
497 // call the python PLACEWINDOW binding
498 EventData
data(_number
, client
, EventPlaceWindow
, 0);
499 Openbox::instance
->bindings()->fireEvent(&data
);
502 // create the decoration frame for the client window
503 client
->frame
= new OBFrame(client
, &_style
);
505 // add to the wm's map
506 Openbox::instance
->addClient(client
->frame
->window(), client
);
507 Openbox::instance
->addClient(client
->frame
->plate(), client
);
508 Openbox::instance
->addClient(client
->frame
->titlebar(), client
);
509 Openbox::instance
->addClient(client
->frame
->label(), client
);
510 Openbox::instance
->addClient(client
->frame
->button_max(), client
);
511 Openbox::instance
->addClient(client
->frame
->button_iconify(), client
);
512 Openbox::instance
->addClient(client
->frame
->button_stick(), client
);
513 Openbox::instance
->addClient(client
->frame
->button_close(), client
);
514 Openbox::instance
->addClient(client
->frame
->handle(), client
);
515 Openbox::instance
->addClient(client
->frame
->grip_left(), client
);
516 Openbox::instance
->addClient(client
->frame
->grip_right(), client
);
518 // reparent the client to the frame
519 client
->frame
->grabClient();
521 // if on the current desktop.. (or all desktops)
522 if (client
->desktop() == _desktop
||
523 client
->desktop() == (signed)0xffffffff) {
524 client
->frame
->show();
527 // XXX: handle any requested states such as maximized
529 otk::OBDisplay::ungrab();
531 // add to the screen's list
532 clients
.push_back(client
);
533 // this puts into the stacking order, then raises it
534 _stacking
.push_back(client
);
535 restack(true, client
);
536 // update the root properties
539 Openbox::instance
->bindings()->grabButtons(true, client
);
541 // call the python NEWWINDOW binding
542 EventData
data(_number
, client
, EventNewWindow
, 0);
543 Openbox::instance
->bindings()->fireEvent(&data
);
546 printf("Managed window 0x%lx\n", window
);
551 void OBScreen::unmanageWindow(OBClient
*client
)
553 OBFrame
*frame
= client
->frame
;
555 // call the python CLOSEWINDOW binding
556 EventData
data(_number
, client
, EventCloseWindow
, 0);
557 Openbox::instance
->bindings()->fireEvent(&data
);
559 Openbox::instance
->bindings()->grabButtons(false, client
);
561 // remove from the wm's map
562 Openbox::instance
->removeClient(client
->window());
563 Openbox::instance
->removeClient(frame
->window());
564 Openbox::instance
->removeClient(frame
->plate());
565 Openbox::instance
->removeClient(frame
->titlebar());
566 Openbox::instance
->removeClient(frame
->label());
567 Openbox::instance
->removeClient(frame
->button_max());
568 Openbox::instance
->removeClient(frame
->button_iconify());
569 Openbox::instance
->removeClient(frame
->button_stick());
570 Openbox::instance
->removeClient(frame
->button_close());
571 Openbox::instance
->removeClient(frame
->handle());
572 Openbox::instance
->removeClient(frame
->grip_left());
573 Openbox::instance
->removeClient(frame
->grip_right());
574 // unregister for handling events
575 Openbox::instance
->clearHandler(client
->window());
577 // remove the window from our save set
578 XChangeSaveSet(otk::OBDisplay::display
, client
->window(), SetModeDelete
);
580 // we dont want events no more
581 XSelectInput(otk::OBDisplay::display
, client
->window(), NoEventMask
);
585 // give the client its border back
586 client
->toggleClientBorder(true);
588 // reparent the window out of the frame
589 frame
->releaseClient();
591 delete client
->frame
;
594 // remove from the stacking order
595 _stacking
.remove(client
);
597 // remove from the screen's list
598 clients
.remove(client
);
600 // unfocus the client (calls the focus callbacks)
604 printf("Unmanaged window 0x%lx\n", client
->window());
609 // update the root properties
613 void OBScreen::restack(bool raise
, OBClient
*client
)
615 const int layer
= client
->layer();
616 std::vector
<Window
> wins
;
618 _stacking
.remove(client
);
620 // the stacking list is from highest to lowest
622 OBClient::List::iterator it
= _stacking
.begin(), end
= _stacking
.end();
623 // insert the windows above this window
624 for (; it
!= end
; ++it
) {
625 if ((*it
)->layer() < layer
|| (raise
&& (*it
)->layer() == layer
))
627 wins
.push_back((*it
)->frame
->window());
630 wins
.push_back(client
->frame
->window());
631 _stacking
.insert(it
, client
);
632 // insert the remaining below this window
633 for (; it
!= end
; ++it
)
634 wins
.push_back((*it
)->frame
->window());
636 XRestackWindows(otk::OBDisplay::display
, &wins
[0], wins
.size());
637 changeStackingList();
640 void OBScreen::changeDesktop(long desktop
)
642 assert(desktop
>= 0 && desktop
< _num_desktops
);
644 if (!(desktop
>= 0 && desktop
< _num_desktops
)) return;
646 printf("Moving to desktop %ld\n", desktop
);
651 Openbox::instance
->property()->set(_info
->rootWindow(),
652 otk::OBProperty::net_current_desktop
,
653 otk::OBProperty::Atom_Cardinal
,
656 if (old
== _desktop
) return;
658 OBClient::List::iterator it
, end
= clients
.end();
659 for (it
= clients
.begin(); it
!= end
; ++it
) {
660 if ((*it
)->desktop() == old
) {
661 (*it
)->frame
->hide();
662 } else if ((*it
)->desktop() == _desktop
) {
663 (*it
)->frame
->show();
667 // force the callbacks to fire
668 if (!Openbox::instance
->focusedClient())
669 Openbox::instance
->setFocusedClient(0);
672 void OBScreen::changeNumDesktops(long num
)
676 if (!(num
> 0)) return;
678 // XXX: move windows on desktops that will no longer exist!
681 Openbox::instance
->property()->set(_info
->rootWindow(),
682 otk::OBProperty::net_number_of_desktops
,
683 otk::OBProperty::Atom_Cardinal
,
686 // set the viewport hint
687 unsigned long *viewport
= new unsigned long[_num_desktops
* 2];
688 memset(viewport
, 0, sizeof(unsigned long) * _num_desktops
* 2);
689 Openbox::instance
->property()->set(_info
->rootWindow(),
690 otk::OBProperty::net_desktop_viewport
,
691 otk::OBProperty::Atom_Cardinal
,
692 viewport
, _num_desktops
* 2);
695 // update the work area hint
700 void OBScreen::updateDesktopNames()
702 const otk::OBProperty
*property
= Openbox::instance
->property();
704 unsigned long num
= (unsigned) -1;
706 if (!property
->get(_info
->rootWindow(),
707 otk::OBProperty::net_desktop_names
,
708 otk::OBProperty::utf8
, &num
, &_desktop_names
))
709 _desktop_names
.clear();
710 while ((long)_desktop_names
.size() < _num_desktops
)
711 _desktop_names
.push_back("Unnamed");
715 void OBScreen::setDesktopName(long i
, const std::string
&name
)
719 if (i
>= _num_desktops
) return;
721 const otk::OBProperty
*property
= Openbox::instance
->property();
723 otk::OBProperty::StringVect newnames
= _desktop_names
;
725 property
->set(_info
->rootWindow(), otk::OBProperty::net_desktop_names
,
726 otk::OBProperty::utf8
, newnames
);
730 void OBScreen::propertyHandler(const XPropertyEvent
&e
)
732 otk::OtkEventHandler::propertyHandler(e
);
734 const otk::OBProperty
*property
= Openbox::instance
->property();
736 // compress changes to a single property into a single change
738 while (XCheckTypedEvent(otk::OBDisplay::display
, e
.type
, &ce
)) {
739 // XXX: it would be nice to compress ALL changes to a property, not just
740 // changes in a row without other props between.
741 if (ce
.xproperty
.atom
!= e
.atom
) {
742 XPutBackEvent(otk::OBDisplay::display
, &ce
);
747 if (e
.atom
== property
->atom(otk::OBProperty::net_desktop_names
))
748 updateDesktopNames();
752 void OBScreen::clientMessageHandler(const XClientMessageEvent
&e
)
754 otk::OtkEventHandler::clientMessageHandler(e
);
756 if (e
.format
!= 32) return;
758 const otk::OBProperty
*property
= Openbox::instance
->property();
760 if (e
.message_type
== property
->atom(otk::OBProperty::net_current_desktop
)) {
761 changeDesktop(e
.data
.l
[0]);
762 } else if (e
.message_type
==
763 property
->atom(otk::OBProperty::net_number_of_desktops
)) {
764 changeNumDesktops(e
.data
.l
[0]);
766 // XXX: so many client messages to handle here! ..or not.. they go to clients
770 void OBScreen::mapRequestHandler(const XMapRequestEvent
&e
)
772 otk::OtkEventHandler::mapRequestHandler(e
);
775 printf("MapRequest for 0x%lx\n", e
.window
);
779 MapRequest events come here even after the window exists instead of going
780 right to the client window, because of how they are sent and their struct
783 OBClient
*c
= Openbox::instance
->findClient(e
.window
);
786 // send a net_active_window message
788 ce
.xclient
.type
= ClientMessage
;
789 ce
.xclient
.message_type
=
790 Openbox::instance
->property()->atom(otk::OBProperty::net_active_window
);
791 ce
.xclient
.display
= otk::OBDisplay::display
;
792 ce
.xclient
.window
= c
->window();
793 ce
.xclient
.format
= 32;
794 ce
.xclient
.data
.l
[0] = 0l;
795 ce
.xclient
.data
.l
[1] = 0l;
796 ce
.xclient
.data
.l
[2] = 0l;
797 ce
.xclient
.data
.l
[3] = 0l;
798 ce
.xclient
.data
.l
[4] = 0l;
799 XSendEvent(otk::OBDisplay::display
, _info
->rootWindow(), false,
800 SubstructureRedirectMask
| SubstructureNotifyMask
,
803 manageWindow(e
.window
);