diff options
author | Kent Mein <mein@cs.umn.edu> | 2003-01-01 21:11:26 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2003-01-01 21:11:26 +0300 |
commit | 26aa841a1f07b742a624411e99a652ed344af0d3 (patch) | |
tree | 725b8a828d8f08eb1d2ce8621570e9cb48543526 /intern/ghost | |
parent | 6e8abc4a8eabbce7a1f9e8c7417bb41852906f5e (diff) |
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
Diffstat (limited to 'intern/ghost')
-rwxr-xr-x | intern/ghost/intern/GHOST_WindowX11.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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); |