summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-05-05 15:57:48 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-05-05 15:57:48 +0000
commitea71f02acabad0319104a9da5b8532b3cebe1829 (patch)
treef83ee55e76e52921723ed3a0d9864cad6caad1ac
parente6abb4709f069b534e8bb51956bdfbe03a0689af (diff)
downloadgdk-pixbuf-ea71f02acabad0319104a9da5b8532b3cebe1829.tar.gz
Move gdk_window_clear() into common code, implement in terms of
Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move gdk_window_clear() into common code, implement in terms of gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was not redirected to the backing rectangle. Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into EXTRA_DIST. It does not work well when the file that everything depends on is not in the tarball. Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error with recursion where process_updates() is called from an expose handler. (GtkTextView is highly broken in doing this, but it should work, so it is a nice test case.) Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully handle the case where updates are queued during processing of updates. Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume window is on gdk_display - use that instead of segfaulting.
-rw-r--r--ChangeLog32
-rw-r--r--ChangeLog.pre-2-032
-rw-r--r--ChangeLog.pre-2-1032
-rw-r--r--ChangeLog.pre-2-232
-rw-r--r--ChangeLog.pre-2-432
-rw-r--r--ChangeLog.pre-2-632
-rw-r--r--ChangeLog.pre-2-832
-rw-r--r--gdk/gdkwindow.c63
-rw-r--r--gdk/x11/gdkwindow-x11.c19
-rw-r--r--gtk/Makefile.am1
10 files changed, 273 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index f244a1724..d7f288f31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index f244a1724..d7f288f31 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index f244a1724..d7f288f31 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index f244a1724..d7f288f31 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index f244a1724..d7f288f31 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index f244a1724..d7f288f31 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index f244a1724..d7f288f31 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,35 @@
+Fri May 5 11:18:47 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
+ gdk_window_clear() into common code, implement in terms of
+ gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
+ not redirected to the backing rectangle.
+
+Wed Apr 26 01:53:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
+ EXTRA_DIST. It does not work well when the file that
+ everything depends on is not in the tarball.
+
+Tue Apr 25 22:20:41 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
+ with recursion where process_updates() is called from
+ an expose handler. (GtkTextView is highly broken in
+ doing this, but it should work, so it is a nice test
+ case.)
+
+Sun Apr 23 23:39:18 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
+ handle the case where updates are queued during processing of
+ updates.
+
+Tue Apr 18 14:16:50 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
+ window is on gdk_display - use that instead of segfaulting.
+
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 3164b8ecf..a05063665 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -946,6 +946,18 @@ gdk_window_clear_backing_rect (GdkWindow *window,
}
void
+gdk_window_clear (GdkWindow *window)
+{
+ GdkWindowPrivate *private = (GdkWindowPrivate *)window;
+
+ g_return_if_fail (window != NULL);
+ g_return_if_fail (GDK_IS_WINDOW (window));
+
+ gdk_window_clear_area (window, 0, 0,
+ private->drawable.width, private->drawable.height);
+}
+
+void
gdk_window_clear_area (GdkWindow *window,
gint x,
gint y,
@@ -1026,33 +1038,42 @@ gdk_window_process_updates_internal (GdkWindow *window)
{
GdkWindowPrivate *private = (GdkWindowPrivate *)window;
gboolean save_region = FALSE;
-
- if (gdk_event_func)
- {
- GdkEvent event;
- GdkRectangle window_rect;
- window_rect.x = 0;
- window_rect.y = 0;
- window_rect.width = private->drawable.width;
- window_rect.height = private->drawable.height;
+ /* If an update got queued during update processing, we can get a
+ * window in the update queue that has an empty update_area.
+ * just ignore it.
+ */
+ if (private->update_area)
+ {
+ GdkRegion *update_area = private->update_area;
+ private->update_area = NULL;
+
+ if (gdk_event_func)
+ {
+ GdkEvent event;
+ GdkRectangle window_rect;
+
+ window_rect.x = 0;
+ window_rect.y = 0;
+ window_rect.width = private->drawable.width;
+ window_rect.height = private->drawable.height;
- save_region = _gdk_windowing_window_queue_antiexpose (window, private->update_area);
+ save_region = _gdk_windowing_window_queue_antiexpose (window, update_area);
- event.expose.type = GDK_EXPOSE;
- event.expose.window = gdk_window_ref ((GdkWindow *)private);
- event.expose.count = 0;
+ event.expose.type = GDK_EXPOSE;
+ event.expose.window = gdk_window_ref ((GdkWindow *)private);
+ event.expose.count = 0;
- gdk_region_get_clipbox (private->update_area, &event.expose.area);
- if (gdk_rectangle_intersect (&event.expose.area, &window_rect, &event.expose.area))
- {
- (*gdk_event_func) (&event, gdk_event_data);
+ gdk_region_get_clipbox (update_area, &event.expose.area);
+ if (gdk_rectangle_intersect (&event.expose.area, &window_rect, &event.expose.area))
+ {
+ (*gdk_event_func) (&event, gdk_event_data);
+ }
}
+
+ if (!save_region)
+ gdk_region_destroy (update_area);
}
-
- if (!save_region)
- gdk_region_destroy (private->update_area);
- private->update_area = NULL;
}
void
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 0dfd24cd1..9011ac6e1 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -463,7 +463,7 @@ gdk_window_foreign_new (guint32 anid)
parent_private->children = g_list_prepend (parent_private->children, window);
GDK_DRAWABLE_XDATA (window)->xid = anid;
- GDK_DRAWABLE_XDATA (window)->xdisplay = GDK_DRAWABLE_XDISPLAY (private->parent);
+ GDK_DRAWABLE_XDATA (window)->xdisplay = gdk_display;
private->x = attrs.x;
private->y = attrs.y;
@@ -806,16 +806,6 @@ gdk_window_reparent (GdkWindow *window,
}
void
-gdk_window_clear (GdkWindow *window)
-{
- g_return_if_fail (window != NULL);
- g_return_if_fail (GDK_IS_WINDOW (window));
-
- if (!GDK_DRAWABLE_DESTROYED (window))
- XClearWindow (GDK_DRAWABLE_XDISPLAY (window), GDK_DRAWABLE_XID (window));
-}
-
-void
_gdk_windowing_window_clear_area (GdkWindow *window,
gint x,
gint y,
@@ -1348,12 +1338,15 @@ gdk_window_get_pointer (GdkWindow *window,
int winx = 0;
int winy = 0;
unsigned int xmask = 0;
+ gint xoffset, yoffset;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
if (!window)
window = gdk_parent_root;
+ _gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
+
return_val = NULL;
if (!GDK_DRAWABLE_DESTROYED (window) &&
XQueryPointer (GDK_DRAWABLE_XDISPLAY (window),
@@ -1365,9 +1358,9 @@ gdk_window_get_pointer (GdkWindow *window,
}
if (x)
- *x = winx;
+ *x = winx + xoffset;
if (y)
- *y = winy;
+ *y = winy + yoffset;
if (mask)
*mask = xmask;
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 50b77f76c..296dda3e7 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -481,6 +481,7 @@ test-debug: testgtk
$(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtk
EXTRA_DIST += @STRIP_BEGIN@ \
+ OLD_STAMP \
testgtk.1 \
testgtkrc \
testgtkrc2 \