Commit cac12e4d authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

don't try to set the state of unmapped windows, call

2006-08-10  Michael Natterer  <mitch@imendio.com>

	* gdk/quartz/gdkwindow-quartz.c
	(gdk_window_maximize)
	(gdk_window_unmaximize)
	(gdk_window_iconify)
	(gdk_window_deiconify): don't try to set the state of unmapped
	windows, call gdk_synthesize_window_state() instead. Also added
	autorelease pools back, seems they are needed after all.

	* gdk/quartz/gdkwindow-quartz.c (show_window_internal): maximize
	and iconify windows here if the state says so.
parent 1865c0a1
2006-08-10 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkwindow-quartz.c
(gdk_window_maximize)
(gdk_window_unmaximize)
(gdk_window_iconify)
(gdk_window_deiconify): don't try to set the state of unmapped
windows, call gdk_synthesize_window_state() instead. Also added
autorelease pools back, seems they are needed after all.
* gdk/quartz/gdkwindow-quartz.c (show_window_internal): maximize
and iconify windows here if the state says so.
2006-08-09 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_geometry_hints):
......
2006-08-10 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkwindow-quartz.c
(gdk_window_maximize)
(gdk_window_unmaximize)
(gdk_window_iconify)
(gdk_window_deiconify): don't try to set the state of unmapped
windows, call gdk_synthesize_window_state() instead. Also added
autorelease pools back, seems they are needed after all.
* gdk/quartz/gdkwindow-quartz.c (show_window_internal): maximize
and iconify windows here if the state says so.
2006-08-09 Michael Natterer <mitch@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_geometry_hints):
......
......@@ -754,7 +754,8 @@ all_parents_shown (GdkWindowObject *private)
}
static void
show_window_internal (GdkWindow *window, gboolean raise)
show_window_internal (GdkWindow *window,
gboolean raise)
{
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
......@@ -783,6 +784,12 @@ show_window_internal (GdkWindow *window, gboolean raise)
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_WITHDRAWN, 0);
if (private->state & GDK_WINDOW_STATE_MAXIMIZED)
gdk_window_maximize (window);
if (private->state & GDK_WINDOW_STATE_ICONIFIED)
gdk_window_iconify (window);
GDK_QUARTZ_RELEASE_POOL;
}
......@@ -1788,14 +1795,26 @@ gdk_window_maximize (GdkWindow *window)
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
if (impl->toplevel && ![impl->toplevel isZoomed])
[impl->toplevel zoom:nil];
if (GDK_WINDOW_IS_MAPPED (window))
{
GDK_QUARTZ_ALLOC_POOL;
if (impl->toplevel && ![impl->toplevel isZoomed])
[impl->toplevel zoom:nil];
GDK_QUARTZ_RELEASE_POOL;
}
else
{
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_MAXIMIZED);
}
}
void
......@@ -1810,8 +1829,21 @@ gdk_window_unmaximize (GdkWindow *window)
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
if (impl->toplevel && [impl->toplevel isZoomed])
[impl->toplevel zoom:nil];
if (GDK_WINDOW_IS_MAPPED (window))
{
GDK_QUARTZ_ALLOC_POOL;
if (impl->toplevel && [impl->toplevel isZoomed])
[impl->toplevel zoom:nil];
GDK_QUARTZ_RELEASE_POOL;
}
else
{
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_MAXIMIZED,
0);
}
}
void
......@@ -1826,8 +1858,21 @@ gdk_window_iconify (GdkWindow *window)
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
if (impl->toplevel)
[impl->toplevel miniaturize:nil];
if (GDK_WINDOW_IS_MAPPED (window))
{
GDK_QUARTZ_ALLOC_POOL;
if (impl->toplevel)
[impl->toplevel miniaturize:nil];
GDK_QUARTZ_RELEASE_POOL;
}
else
{
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
}
}
void
......@@ -1842,8 +1887,21 @@ gdk_window_deiconify (GdkWindow *window)
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
if (impl->toplevel)
[impl->toplevel deminiaturize:nil];
if (GDK_WINDOW_IS_MAPPED (window))
{
GDK_QUARTZ_ALLOC_POOL;
if (impl->toplevel)
[impl->toplevel deminiaturize:nil];
GDK_QUARTZ_RELEASE_POOL;
}
else
{
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED,
0);
}
}
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment