--- old/modules/graphics/src/main/native-glass/gtk/GlassWindow.cpp 2014-11-14 18:51:48.652864633 +0300 +++ new/modules/graphics/src/main/native-glass/gtk/GlassWindow.cpp 2014-11-14 18:51:48.528864630 +0300 @@ -55,6 +55,22 @@ return NORMAL; } +static GdkWMFunction glass_mask_to_wm_function(jint mask) { + int func = GDK_FUNC_RESIZE | GDK_FUNC_MOVE; + + if (mask & com_sun_glass_ui_gtk_GtkWindow_CLOSABLE) { + func |= GDK_FUNC_CLOSE; + } + if (mask & com_sun_glass_ui_gtk_GtkWindow_MAXIMIZABLE) { + func |= GDK_FUNC_MAXIMIZE; + } + if (mask & com_sun_glass_ui_gtk_GtkWindow_MINIMIZABLE) { + func |= GDK_FUNC_MINIMIZE; + } + + return (GdkWMFunction) func; +} + extern "C" { /* @@ -71,7 +87,9 @@ (WindowContext*)JLONG_TO_PTR(owner), screen, glass_mask_to_window_frame_type(mask), - glass_mask_to_window_type(mask)); + glass_mask_to_window_type(mask), + glass_mask_to_wm_function(mask) + ); return PTR_TO_JLONG(ctx); } --- old/modules/graphics/src/main/native-glass/gtk/glass_window.cpp 2014-11-14 18:51:49.036864643 +0300 +++ new/modules/graphics/src/main/native-glass/gtk/glass_window.cpp 2014-11-14 18:51:48.912864639 +0300 @@ -626,7 +626,7 @@ WindowContextTop::WindowContextTop(jobject _jwindow, WindowContext* _owner, long _screen, - WindowFrameType _frame_type, WindowType type) : + WindowFrameType _frame_type, WindowType type, GdkWMFunction wmf) : WindowContextBase(), screen(_screen), frame_type(_frame_type), @@ -685,6 +685,10 @@ gdk_window_register_dnd(gdk_window); + if (wmf) { + gdk_window_set_functions(gdk_window, wmf); + } + if (frame_type == TITLED) { request_frame_extents(); } @@ -1750,7 +1754,8 @@ return; } - full_screen_window = new WindowContextTop(jwindow, NULL, 0L, UNTITLED, NORMAL); + full_screen_window = new WindowContextTop(jwindow, NULL, 0L, UNTITLED, + NORMAL, (GdkWMFunction) 0); int x, y, w, h; gdk_window_get_origin(gdk_window, &x, &y); gdk_window_get_geometry(gdk_window, NULL, NULL, &w, &h, NULL); --- old/modules/graphics/src/main/native-glass/gtk/glass_window.h 2014-11-14 18:51:49.444864653 +0300 +++ new/modules/graphics/src/main/native-glass/gtk/glass_window.h 2014-11-14 18:51:49.316864650 +0300 @@ -382,7 +382,7 @@ bool size_assigned; bool on_top; public: - WindowContextTop(jobject, WindowContext*, long, WindowFrameType, WindowType); + WindowContextTop(jobject, WindowContext*, long, WindowFrameType, WindowType, GdkWMFunction); void process_map(); void process_property_notify(GdkEventProperty*); void process_configure(GdkEventConfigure*);