gdk/win32/gdkevents-win32.c (gdk_event_translate) <WM_MOUSEACTIVATE> Call

2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSEACTIVATE>
	* gdk/win32/gdkwindow-win32.c (show_window_internal)
	(gdk_window_raise): Call SetWindowPos() instead of
	SetForegroundWindow() or BringWindowToTop() if the window
	shouldn't accept focus. (#327375)
This commit is contained in:
John Ehresman 2006-02-09 03:20:56 +00:00 committed by Tor Lillqvist
parent c502c9aeab
commit e847ace84b
4 changed files with 38 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2006-02-08 John Ehresman <jpe@wingware.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate)
<WM_MOUSEACTIVATE>
* gdk/win32/gdkwindow-win32.c (show_window_internal)
(gdk_window_raise): Call SetWindowPos() instead of
SetForegroundWindow() or BringWindowToTop() if the window
shouldn't accept focus. (#327375)
2006-02-08 John Ehresman <jpe@wingware.com>
* gdk/win32/gdkwindow-win32.c: Let gdk_window_set_decorations()

View File

@ -1,3 +1,12 @@
2006-02-08 John Ehresman <jpe@wingware.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate)
<WM_MOUSEACTIVATE>
* gdk/win32/gdkwindow-win32.c (show_window_internal)
(gdk_window_raise): Call SetWindowPos() instead of
SetForegroundWindow() or BringWindowToTop() if the window
shouldn't accept focus. (#327375)
2006-02-08 John Ehresman <jpe@wingware.com>
* gdk/win32/gdkwindow-win32.c: Let gdk_window_set_decorations()

View File

@ -2921,7 +2921,8 @@ gdk_event_translate (MSG *msg,
break;
case WM_MOUSEACTIVATE:
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP)
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|| !((GdkWindowObject *)window)->accept_focus)
{
*ret_valp = MA_NOACTIVATE;
return_val = TRUE;

View File

@ -1072,7 +1072,14 @@ show_window_internal (GdkWindow *window,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
SetForegroundWindow (GDK_WINDOW_HWND (window));
{
if (focus_on_map && private->accept_focus)
SetForegroundWindow (GDK_WINDOW_HWND (window));
else
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
else
BringWindowToTop (GDK_WINDOW_HWND (window));
}
@ -1471,7 +1478,16 @@ gdk_window_raise (GdkWindow *window)
GDK_NOTE (MISC, g_print ("gdk_window_raise: %p\n",
GDK_WINDOW_HWND (window)));
API_CALL (BringWindowToTop, (GDK_WINDOW_HWND (window)));
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
else if (((GdkWindowObject *)window)->accept_focus)
API_CALL (BringWindowToTop, (GDK_WINDOW_HWND (window)));
else
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
}
}