2
* $Id: GHOST_WindowX11.cpp,v 1.10 2004/02/23 14:10:00 sirdude Exp $
2
* $Id: GHOST_WindowX11.cpp,v 1.13 2004/12/04 00:12:53 blendix Exp $
3
3
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
* This program is free software; you can redistribute it and/or
68
68
GHOST_TDrawingContextType type,
69
69
const bool stereoVisual
71
GHOST_Window(title,left,top,width,height,state,type),
71
GHOST_Window(title,left,top,width,height,state,type,stereoVisual),
72
72
m_display(display),
73
73
m_valid_setup (false),
398
401
if (order == GHOST_kWindowOrderTop) {
399
402
XWindowAttributes attr;
401
XRaiseWindow(m_display,m_window);
405
/* We use both XRaiseWindow and _NET_ACTIVE_WINDOW, since some
406
window managers ignore the former (e.g. kwin from kde) and others
407
don't implement the latter (e.g. fluxbox pre 0.9.9) */
409
XRaiseWindow(m_display, m_window);
411
atom = XInternAtom(m_display, "_NET_ACTIVE_WINDOW", True);
418
xev.xclient.type = ClientMessage;
419
xev.xclient.serial = 0;
420
xev.xclient.send_event = True;
421
xev.xclient.window = m_window;
422
xev.xclient.message_type = atom;
424
xev.xclient.format = 32;
425
xev.xclient.data.l[0] = 0;
426
xev.xclient.data.l[1] = 0;
427
xev.xclient.data.l[2] = 0;
428
xev.xclient.data.l[3] = 0;
429
xev.xclient.data.l[4] = 0;
431
root = RootWindow(m_display, m_visual->screen),
432
eventmask = SubstructureRedirectMask | SubstructureNotifyMask;
434
XSendEvent(m_display, root, False, eventmask, &xev);
403
437
XGetWindowAttributes(m_display, m_window, &attr);