forked from AuroraMiddleware/gtk
Quartz: Implement gdk_window_set_functions
This is useful, and easy to implement.
This commit is contained in:
parent
482d0def4e
commit
8531ee4c88
@ -2324,9 +2324,47 @@ static void
|
||||
gdk_quartz_window_set_functions (GdkWindow *window,
|
||||
GdkWMFunction functions)
|
||||
{
|
||||
GdkWindowImplQuartz *impl;
|
||||
gboolean min, max, close;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
/* FIXME: Implement */
|
||||
imple = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
|
||||
if (functions & GDK_FUNC_ALL)
|
||||
{
|
||||
min = !(functions & GDK_FUNC_MINIMIZE);
|
||||
max = !(functions & GDK_FUNC_MAXIMIZE);
|
||||
close = !(functions & GDK_FUNC_CLOSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
min = (functions & GDK_FUNC_MINIMIZE);
|
||||
max = (functions & GDK_FUNC_MAXIMIZE);
|
||||
close = (functions & GDK_FUNC_CLOSE);
|
||||
}
|
||||
|
||||
if (impl->toplevel)
|
||||
{
|
||||
NSWindowStyleMask mask = [impl->toplevel styleMask];
|
||||
|
||||
if (min)
|
||||
mask = mask | NSMiniaturizableWindowMask;
|
||||
else
|
||||
mask = mask & ~NSMiniaturizableWindowMask;
|
||||
|
||||
if (max)
|
||||
mask = mask | NSResizableWindowMask;
|
||||
else
|
||||
mask = mask & ~NSResizableWindowMask;
|
||||
|
||||
if (close)
|
||||
mask = mask | NSClosableWindowMask;
|
||||
else
|
||||
mask = mask & ~NSClosableWindowMask;
|
||||
|
||||
[impl->toplevel setStyleMask:mask];
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user