Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2004-09-06 02:51:50 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2004-09-06 02:51:50 +0400
commit33906b91177c0af30e7d2849bece042703d4c217 (patch)
tree2b5e5dba93d85867b345f4297fddf70d8e7127b4 /intern
parentea815d51ce3b75e67ec78c29ade9f6abb4fddc36 (diff)
Bugfix for the render window not popping to the front when it already existed,
under linux / x11 / KDE. The new behaviour in 2.34, not recreating the render window on re-render, revealed that raising windows did not work under some window managers. Now the "net wm extensions" are used if available, otherwise it will work the same way as before (e.g. Gtk+ does this as well). More info: http://www.freedesktop.org/Standards/wm-spec
Diffstat (limited to 'intern')
-rwxr-xr-xintern/ghost/intern/GHOST_WindowX11.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 373506f370e..046913ea416 100755
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -397,8 +397,37 @@ setOrder(
){
if (order == GHOST_kWindowOrderTop) {
XWindowAttributes attr;
+ Atom atom;
+
+ atom = XInternAtom(m_display, "_NET_ACTIVE_WINDOW", True);
- XRaiseWindow(m_display,m_window);
+ if(atom == None) {
+ /* XRaiseWindow might be ignored, only use it if no other choice */
+ XRaiseWindow(m_display, m_window);
+ }
+ else {
+ Window root;
+ XEvent xev;
+ long eventmask;
+
+ xev.xclient.type = ClientMessage;
+ xev.xclient.serial = 0;
+ xev.xclient.send_event = True;
+ xev.xclient.window = m_window;
+ xev.xclient.message_type = atom;
+
+ xev.xclient.format = 32;
+ xev.xclient.data.l[0] = 0;
+ xev.xclient.data.l[1] = 0;
+ xev.xclient.data.l[2] = 0;
+ xev.xclient.data.l[3] = 0;
+ xev.xclient.data.l[4] = 0;
+
+ root = RootWindow(m_display, m_visual->screen),
+ eventmask = SubstructureRedirectMask | SubstructureNotifyMask;
+
+ XSendEvent(m_display, root, False, eventmask, &xev);
+ }
XGetWindowAttributes(m_display, m_window, &attr);