summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-01-15 18:41:43 +0000
committerTim Janik <timj@src.gnome.org>1999-01-15 18:41:43 +0000
commit87620764ae76d0ce518ca30f8ed19c60e2fdbfec (patch)
treec138e6f62d12d65e80e7e9ff801507e91503c487 /gdk
parent2e99e7713dc73ea5b7a000ab03b4d64176b9ad40 (diff)
downloadgtk+-87620764ae76d0ce518ca30f8ed19c60e2fdbfec.tar.gz
define GTK_DISABLE_COMPAT_H for compilation of gtk code.
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org> * gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk code. * gtk/gtkrc.c (gtk_rc_style_unref): added an assertment. * gtk/gtkcompat.h: * gtk/gtklabel.h: don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined. * gtk/gtkstyle.h: * gtk/gtkstyle.c: coding style, indentation and alignment fixups. (gtk_draw_string): (gtk_paint_string): (gtk_draw_polygon): (gtk_style_set_background): fixed assertments. (gtk_default_draw_ramp): (gtk_default_draw_cross): (gtk_default_draw_oval): issue warnings since these functions aren't yet implemented. * gdk/gdkwindow.c: (gdk_window_hide): only unmap window if already mapped. (gdk_window_show): only map window if !mapped. (gdk_window_internal_destroy): destroyed windows can't be mapped. * gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just because a resize is queued on a widget, we rely on the expose events now.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkwindow.c22
-rw-r--r--gdk/x11/gdkwindow-x11.c22
2 files changed, 22 insertions, 22 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 56e8cdfb81..c0f34c12e4 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -529,14 +529,15 @@ gdk_window_foreign_new (guint32 anid)
}
/* Call this function when you want a window and all its children to
- disappear. When xdestroy is true, a request to destroy the XWindow
- is sent out. When it is false, it is assumed that the XWindow has
- been or will be destroyed by destroying some ancestor of this
- window. */
-
+ * disappear. When xdestroy is true, a request to destroy the XWindow
+ * is sent out. When it is false, it is assumed that the XWindow has
+ * been or will be destroyed by destroying some ancestor of this
+ * window.
+ */
static void
-gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
- gboolean our_destroy)
+gdk_window_internal_destroy (GdkWindow *window,
+ gboolean xdestroy,
+ gboolean our_destroy)
{
GdkWindowPrivate *private;
GdkWindowPrivate *temp_private;
@@ -630,6 +631,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
if (private->colormap)
gdk_colormap_unref (private->colormap);
+ private->mapped = FALSE;
private->destroyed = TRUE;
}
break;
@@ -716,7 +718,7 @@ gdk_window_show (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
- if (!private->destroyed)
+ if (!private->destroyed && !private->mapped)
{
private->mapped = TRUE;
XRaiseWindow (private->xdisplay, private->xwindow);
@@ -732,7 +734,7 @@ gdk_window_hide (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
- if (!private->destroyed)
+ if (!private->destroyed && private->mapped)
{
private->mapped = FALSE;
XUnmapWindow (private->xdisplay, private->xwindow);
@@ -2533,5 +2535,3 @@ gdk_drawable_set_data (GdkDrawable *drawable,
{
g_dataset_set_data_full (drawable, key, data, destroy_func);
}
-
-
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 56e8cdfb81..c0f34c12e4 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -529,14 +529,15 @@ gdk_window_foreign_new (guint32 anid)
}
/* Call this function when you want a window and all its children to
- disappear. When xdestroy is true, a request to destroy the XWindow
- is sent out. When it is false, it is assumed that the XWindow has
- been or will be destroyed by destroying some ancestor of this
- window. */
-
+ * disappear. When xdestroy is true, a request to destroy the XWindow
+ * is sent out. When it is false, it is assumed that the XWindow has
+ * been or will be destroyed by destroying some ancestor of this
+ * window.
+ */
static void
-gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
- gboolean our_destroy)
+gdk_window_internal_destroy (GdkWindow *window,
+ gboolean xdestroy,
+ gboolean our_destroy)
{
GdkWindowPrivate *private;
GdkWindowPrivate *temp_private;
@@ -630,6 +631,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
if (private->colormap)
gdk_colormap_unref (private->colormap);
+ private->mapped = FALSE;
private->destroyed = TRUE;
}
break;
@@ -716,7 +718,7 @@ gdk_window_show (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
- if (!private->destroyed)
+ if (!private->destroyed && !private->mapped)
{
private->mapped = TRUE;
XRaiseWindow (private->xdisplay, private->xwindow);
@@ -732,7 +734,7 @@ gdk_window_hide (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
- if (!private->destroyed)
+ if (!private->destroyed && private->mapped)
{
private->mapped = FALSE;
XUnmapWindow (private->xdisplay, private->xwindow);
@@ -2533,5 +2535,3 @@ gdk_drawable_set_data (GdkDrawable *drawable,
{
g_dataset_set_data_full (drawable, key, data, destroy_func);
}
-
-