exstyle changed after the window size adjustment

Originaly the size of the window based on the client area size has
been calculated first and then variables dwStyle and dwExStyle have
been changed. Thus the window size has been calculated for different
windows type then eventually used when calling CreateWindowEx. This
caused for example the Gimp tool windows to have different size than
formerly saved in session. The whole code calculating the window size
is moved after the last adjustment of dwExStyle variable in this patch.

Signed-off-by: Hans Breuer <hans@breuer.org>
This commit is contained in:
Pavel
2013-01-21 20:31:20 +01:00
committed by Hans Breuer
parent 6d329406ae
commit 7ff6e601c3

View File

@@ -621,6 +621,21 @@ _gdk_window_impl_new (GdkWindow *window,
GDK_NOTE (MISC, g_print ("... GDK_INPUT_ONLY, system colormap\n"));
}
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else
title = get_default_title ();
if (!title || !*title)
title = "";
impl->native_event_mask = GDK_STRUCTURE_MASK | event_mask;
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
dwExStyle |= WS_EX_TOOLWINDOW;
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
@@ -703,21 +718,6 @@ _gdk_window_impl_new (GdkWindow *window,
y = private->y + private->parent->abs_y - offset_y;
}
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else
title = get_default_title ();
if (!title || !*title)
title = "";
impl->native_event_mask = GDK_STRUCTURE_MASK | event_mask;
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
dwExStyle |= WS_EX_TOOLWINDOW;
klass = RegisterGdkClass (private->window_type, impl->type_hint);
wtitle = g_utf8_to_utf16 (title, -1, NULL, NULL, NULL);