Commit 8889f2b4 authored by Soeren Sandmann's avatar Soeren Sandmann Committed by Søren Sandmann Pedersen

Add an "override_redirect" bit.

Fri Jul  9 23:26:09 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.h (struct _GdkWindowImplX11): Add an
	"override_redirect" bit.

	* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set it here.

	* gdk/x11/gdkwindow-x11.c (gdk_window_move, gdk_window_resize,
	gdk_window_move_resize):
	Update the local size/position cache
	immediately for override redirect windows.

	* gdk/x11/gdkwindow-x11.c (show_window_internal): Invalidate
	newly mapped child and override redirect windows.
parent 42067dfb
Fri Jul 9 23:26:09 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.h (struct _GdkWindowImplX11): Add an
"override_redirect" bit.
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set it here.
* gdk/x11/gdkwindow-x11.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize):
Update the local size/position cache
immediately for override redirect windows.
* gdk/x11/gdkwindow-x11.c (show_window_internal): Invalidate
newly mapped child and override redirect windows.
2004-07-09 Federico Mena Quintero <federico@ximian.com>
Fixes #137031:
......
Fri Jul 9 23:26:09 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.h (struct _GdkWindowImplX11): Add an
"override_redirect" bit.
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set it here.
* gdk/x11/gdkwindow-x11.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize):
Update the local size/position cache
immediately for override redirect windows.
* gdk/x11/gdkwindow-x11.c (show_window_internal): Invalidate
newly mapped child and override redirect windows.
2004-07-09 Federico Mena Quintero <federico@ximian.com>
Fixes #137031:
......
Fri Jul 9 23:26:09 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.h (struct _GdkWindowImplX11): Add an
"override_redirect" bit.
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set it here.
* gdk/x11/gdkwindow-x11.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize):
Update the local size/position cache
immediately for override redirect windows.
* gdk/x11/gdkwindow-x11.c (show_window_internal): Invalidate
newly mapped child and override redirect windows.
2004-07-09 Federico Mena Quintero <federico@ximian.com>
Fixes #137031:
......
Fri Jul 9 23:26:09 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkwindow-x11.h (struct _GdkWindowImplX11): Add an
"override_redirect" bit.
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set it here.
* gdk/x11/gdkwindow-x11.c (gdk_window_move, gdk_window_resize,
gdk_window_move_resize):
Update the local size/position cache
immediately for override redirect windows.
* gdk/x11/gdkwindow-x11.c (show_window_internal): Invalidate
newly mapped child and override redirect windows.
2004-07-09 Federico Mena Quintero <federico@ximian.com>
Fixes #137031:
......
......@@ -608,6 +608,8 @@ gdk_window_new (GdkWindow *parent,
else
xattributes.override_redirect = False;
impl->override_redirect = xattributes.override_redirect;
if (private->parent && private->parent->guffaw_gravity)
{
xattributes.win_gravity = StaticGravity;
......@@ -683,6 +685,8 @@ gdk_window_new (GdkWindow *parent,
xattributes.override_redirect = True;
xattributes.cursor = None;
xattributes_mask |= CWSaveUnder | CWOverrideRedirect;
impl->override_redirect = TRUE;
}
}
else
......@@ -1215,7 +1219,17 @@ show_window_internal (GdkWindow *window,
g_assert (GDK_WINDOW_IS_MAPPED (window));
if (impl->position_info.mapped)
XMapWindow (xdisplay, xwindow);
{
XMapWindow (xdisplay, xwindow);
if (!private->input_only &&
(private->window_type == GDK_WINDOW_CHILD ||
impl->override_redirect) &&
gdk_window_is_viewable (window))
{
gdk_window_invalidate_rect (window, NULL, TRUE);
}
}
}
}
......@@ -1379,17 +1393,25 @@ gdk_window_move (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_X11 (private->impl);
if (!GDK_WINDOW_DESTROYED (window))
{
if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD)
_gdk_window_move_resize_child (window, x, y,
impl->width, impl->height);
{
_gdk_window_move_resize_child (window, x, y,
impl->width, impl->height);
}
else
{
XMoveWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
x, y);
if (impl->override_redirect)
{
private->x = x;
private->y = y;
}
}
}
}
......@@ -1429,18 +1451,28 @@ gdk_window_resize (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window))
{
if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD)
_gdk_window_move_resize_child (window, private->x, private->y,
width, height);
{
_gdk_window_move_resize_child (window, private->x, private->y,
width, height);
}
else
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (private->impl);
if (width != impl->width || height != impl->height)
private->resize_count += 1;
XResizeWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
width, height);
if (impl->override_redirect)
{
impl->width = width;
impl->height = height;
}
else
{
if (width != impl->width || height != impl->height)
private->resize_count += 1;
}
}
}
}
......@@ -1480,17 +1512,28 @@ gdk_window_move_resize (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window))
{
if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD)
_gdk_window_move_resize_child (window, x, y, width, height);
{
_gdk_window_move_resize_child (window, x, y, width, height);
}
else
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (private->impl);
if (width != impl->width || height != impl->height)
private->resize_count += 1;
XMoveResizeWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
x, y, width, height);
if (impl->override_redirect)
{
private->x = x;
private->y = y;
impl->width = width;
impl->height = height;
}
else
{
if (width != impl->width || height != impl->height)
private->resize_count += 1;
}
}
}
}
......@@ -3286,11 +3329,16 @@ gdk_window_set_override_redirect (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window))
{
attr.override_redirect = (override_redirect == FALSE)?False:True;
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (private->impl);
attr.override_redirect = (override_redirect? True : False);
XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
CWOverrideRedirect,
&attr);
impl->override_redirect = attr.override_redirect;
}
}
......
......@@ -72,6 +72,7 @@ struct _GdkWindowImplX11
GdkXPositionInfo position_info;
GdkToplevelX11 *toplevel; /* Toplevel-specific information */
gint8 toplevel_window_type;
guint override_redirect : 1;
};
struct _GdkWindowImplX11Class
......
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