* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include <config.h>
#include <stdlib.h>
#include "gdk.h" /* gdk_rectangle_intersect */
if (private->extension_events != 0)
_gdk_input_window_destroy (window);
- if (private->window_type == GDK_WINDOW_FOREIGN)
- {
- if (!foreign_destroy && (private->parent != NULL))
- {
- /* It's somebody else's window, but in our hierarchy,
- * so reparent it to the root window, and then call
- * DestroyWindow() on it.
- */
- gdk_window_hide (window);
- gdk_window_reparent (window, NULL, 0, 0);
-
- /* Is this too drastic? Many (most?) applications
- * quit if any window receives WM_QUIT I think.
- * OTOH, I don't think foreign windows are much
- * used, so the question is maybe academic.
- */
- PostMessage (GDK_WINDOW_HWND (window), WM_QUIT, 0, 0);
- }
- }
- else if (!recursing && !foreign_destroy)
+
+ if (!recursing && !foreign_destroy)
{
private->destroyed = TRUE;
DestroyWindow (GDK_WINDOW_HWND (window));
}
}
+void
+_gdk_windowing_window_destroy_foreign (GdkWindow *window)
+{
+ /* It's somebody else's window, but in our hierarchy,
+ * so reparent it to the root window, and then call
+ * DestroyWindow() on it.
+ */
+ gdk_window_hide (window);
+ gdk_window_reparent (window, NULL, 0, 0);
+
+ /* Is this too drastic? Many (most?) applications
+ * quit if any window receives WM_QUIT I think.
+ * OTOH, I don't think foreign windows are much
+ * used, so the question is maybe academic.
+ */
+ PostMessage (GDK_WINDOW_HWND (window), WM_QUIT, 0, 0);
+}
+
/* This function is called when the window really gone.
*/
void
GDK_WINDOW_STATE_WITHDRAWN,
0);
+ /* Use SetWindowPos to show transparent windows so automatic redraws
+ * in other windows can be suppressed.
+ */
+ if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
+ {
+ UINT flags = SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOMOVE | SWP_NOSIZE;
+ if (!raise)
+ flags |= SWP_NOZORDER;
+ if (!raise || GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
+ flags |= SWP_NOACTIVATE;
+
+ SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0, flags);
+ return;
+ }
+
old_active_window = GetActiveWindow ();
if (private->state & (GDK_WINDOW_STATE_BELOW | GDK_WINDOW_STATE_ABOVE))
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
{
- SetWindowPos(GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0,
- SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
+ SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0,
+ SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
}
else
{
case GDK_WINDOW_TYPE_HINT_UTILITY:
break;
case GDK_WINDOW_TYPE_HINT_SPLASHSCREEN:
+ gdk_window_set_decorations (window,
+ GDK_DECOR_ALL |
+ GDK_DECOR_RESIZEH |
+ GDK_DECOR_MENU |
+ GDK_DECOR_MINIMIZE |
+ GDK_DECOR_MAXIMIZE);
break;
case GDK_WINDOW_TYPE_HINT_DOCK:
break;