From 26aa841a1f07b742a624411e99a652ed344af0d3 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Wed, 1 Jan 2003 18:11:26 +0000 Subject: [PATCH] I added the two patches Chris and I pointed too back in Nov. (Adding Window Hints and giving the window input focus after it has been raised.) Kent -- mein@cs.umn.edu --- intern/ghost/intern/GHOST_WindowX11.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 7d3d7dfe62c..1503dbe9ffc 100755 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -182,6 +182,16 @@ GHOST_WindowX11( XSetWMNormalHints(m_display, m_window, xsizehints); XFree(xsizehints); + XClassHint * xclasshint = XAllocClassHint(); + int len = title.Length() +1 ; + char *wmclass = (char *)malloc(sizeof(char) * len); + strncpy(wmclass, (const char*)title, sizeof(char) * len); + xclasshint->res_name = wmclass; + xclasshint->res_class = wmclass; + XSetClassHint(m_display, m_window, xclasshint); + free(wmclass); + XFree(xclasshint); + setTitle(title); // now set up the rendering context. @@ -387,6 +397,8 @@ setOrder( ){ if (order == GHOST_kWindowOrderTop) { XRaiseWindow(m_display,m_window); + XSetInputFocus(m_display, m_window, RevertToPointerRoot, + CurrentTime); XFlush(m_display); } else if (order == GHOST_kWindowOrderBottom) { XLowerWindow(m_display,m_window);