Commit e847ace8 authored by John Ehresman's avatar John Ehresman Committed by Tor Lillqvist
Browse files

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)
parent c502c9ae
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()
......
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()
......
......@@ -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;
......
......@@ -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));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment