< prev index next >

modules/graphics/src/main/native-glass/gtk/GlassWindow.cpp

Print this page

        

*** 53,62 **** --- 53,78 ---- return UTILITY; } 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" { /* * Class: com_sun_glass_ui_gtk_GtkWindow * Method: _createWindow
*** 69,79 **** WindowContext* ctx = new WindowContextTop(obj, (WindowContext*)JLONG_TO_PTR(owner), screen, glass_mask_to_window_frame_type(mask), ! glass_mask_to_window_type(mask)); return PTR_TO_JLONG(ctx); } /* --- 85,97 ---- WindowContext* ctx = new WindowContextTop(obj, (WindowContext*)JLONG_TO_PTR(owner), screen, glass_mask_to_window_frame_type(mask), ! glass_mask_to_window_type(mask), ! glass_mask_to_wm_function(mask) ! ); return PTR_TO_JLONG(ctx); } /*
< prev index next >