summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena <federico@nuclecu.unam.mx>1998-03-17 04:20:47 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-03-17 04:20:47 +0000
commit63955ec2e2c8f43daa6f4832b9f535adbdecd34f (patch)
tree30d8c7612061a08f38f1bc0796237013aa69646d
parent077b5109a4a29187ccf8388fe90251e435089f5b (diff)
downloadgdk-pixbuf-63955ec2e2c8f43daa6f4832b9f535adbdecd34f.tar.gz
Use signed integers so that testing will not fail for windows that are
Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx> * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that testing will not fail for windows that are off-screen. (gdk_window_xid_at_coords): Only considers visible windows.
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.pre-2-08
-rw-r--r--ChangeLog.pre-2-108
-rw-r--r--ChangeLog.pre-2-28
-rw-r--r--ChangeLog.pre-2-48
-rw-r--r--ChangeLog.pre-2-68
-rw-r--r--ChangeLog.pre-2-88
-rw-r--r--gdk/gdkwindow.c72
-rw-r--r--gdk/x11/gdkwindow-x11.c72
9 files changed, 136 insertions, 64 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 2b3ee76aa..b967ebfc7 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+Mon Mar 16 22:31:02 1998 Federico Mena <federico@nuclecu.unam.mx>
+
+ * gdk/gdkwindow.c (gdk_window_xid_at): Use signed integers so that
+ testing will not fail for windows that are off-screen.
+
+ (gdk_window_xid_at_coords): Only considers visible windows.
+
Tue Mar 17 03:56:13 1998 Tim Janik <timj@gimp.org>
* gtk/gtkspinbutton.h: exported gtk_spin_button_spin since it is
@@ -13,6 +20,7 @@ Mon Mar 16 18:19:31 GMT 1998 Tony Gale <gale@gimp.org>
- new question on updating progressbars
- update all the links to gtk.org
+>>>>>>> 1.255
Mon Mar 16 09:15:03 GMT 1998 Tony Gale <gale@gimp.org>
* docs/gtk_tut.sgml:
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index a9ec5f783..3ce3beccb 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -63,7 +63,7 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
Display *disp;
Window *list=NULL;
Window child=0,parent_win=0,root_win=0;
- unsigned int num,i,ww,wh,wb,wd;
+ int num,i,ww,wh,wb,wd;
int wx,wy;
window=(GdkWindow*)&gdk_root_parent;
@@ -82,11 +82,11 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
{
if ((!excl_child)||(!g_list_find(excludes,(gpointer *)list[i])))
{
- if ((child=gdk_window_xid_at(list[i],wx,wy,x,y,excludes,excl_child))!=0)
- {
- XFree(list);
- return child;
- }
+ if ((child=gdk_window_xid_at(list[i],wx,wy,x,y,excludes,excl_child))!=0)
+ {
+ XFree(list);
+ return child;
+ }
}
if (!i) break;
}
@@ -116,7 +116,8 @@ gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child)
Display *disp;
Window *list=NULL;
Window root,child=0,parent_win=0,root_win=0;
- unsigned int num,i;
+ unsigned int num;
+ int i;
GList *gl;
window=(GdkWindow*)&gdk_root_parent;
@@ -129,31 +130,38 @@ gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child)
return root;
if (list)
{
- for (i=num-1;;i--)
- {
- if ((!excl_child)||(!g_list_find(excludes,(gpointer *)list[i])))
- {
- if ((child=gdk_window_xid_at(list[i],0,0,x,y,excludes,excl_child))!=0)
- {
- if (excludes)
- {
- if (!g_list_find(excludes,(gpointer *)child))
- {
- XFree(list);
- XUngrabServer(disp);
- return child;
- }
- }
- else
- {
- XFree(list);
- XUngrabServer(disp);
- return child;
- }
- }
- }
- if (!i) break;
- }
+ i = num - 1;
+ do
+ {
+ XWindowAttributes xwa;
+
+ XGetWindowAttributes (disp, list [i], &xwa);
+
+ if (xwa.map_state != IsViewable)
+ continue;
+
+ if (excl_child && g_list_find(excludes,(gpointer *)list[i]))
+ continue;
+
+ if ((child = gdk_window_xid_at (list[i], 0, 0, x, y, excludes, excl_child)) == 0)
+ continue;
+
+ if (excludes)
+ {
+ if (!g_list_find(excludes,(gpointer *)child))
+ {
+ XFree(list);
+ XUngrabServer(disp);
+ return child;
+ }
+ }
+ else
+ {
+ XFree(list);
+ XUngrabServer(disp);
+ return child;
+ }
+ } while (--i > 0);
XFree(list);
}
XUngrabServer(disp);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index a9ec5f783..3ce3beccb 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -63,7 +63,7 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
Display *disp;
Window *list=NULL;
Window child=0,parent_win=0,root_win=0;
- unsigned int num,i,ww,wh,wb,wd;
+ int num,i,ww,wh,wb,wd;
int wx,wy;
window=(GdkWindow*)&gdk_root_parent;
@@ -82,11 +82,11 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
{
if ((!excl_child)||(!g_list_find(excludes,(gpointer *)list[i])))
{
- if ((child=gdk_window_xid_at(list[i],wx,wy,x,y,excludes,excl_child))!=0)
- {
- XFree(list);
- return child;
- }
+ if ((child=gdk_window_xid_at(list[i],wx,wy,x,y,excludes,excl_child))!=0)
+ {
+ XFree(list);
+ return child;
+ }
}
if (!i) break;
}
@@ -116,7 +116,8 @@ gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child)
Display *disp;
Window *list=NULL;
Window root,child=0,parent_win=0,root_win=0;
- unsigned int num,i;
+ unsigned int num;
+ int i;
GList *gl;
window=(GdkWindow*)&gdk_root_parent;
@@ -129,31 +130,38 @@ gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child)
return root;
if (list)
{
- for (i=num-1;;i--)
- {
- if ((!excl_child)||(!g_list_find(excludes,(gpointer *)list[i])))
- {
- if ((child=gdk_window_xid_at(list[i],0,0,x,y,excludes,excl_child))!=0)
- {
- if (excludes)
- {
- if (!g_list_find(excludes,(gpointer *)child))
- {
- XFree(list);
- XUngrabServer(disp);
- return child;
- }
- }
- else
- {
- XFree(list);
- XUngrabServer(disp);
- return child;
- }
- }
- }
- if (!i) break;
- }
+ i = num - 1;
+ do
+ {
+ XWindowAttributes xwa;
+
+ XGetWindowAttributes (disp, list [i], &xwa);
+
+ if (xwa.map_state != IsViewable)
+ continue;
+
+ if (excl_child && g_list_find(excludes,(gpointer *)list[i]))
+ continue;
+
+ if ((child = gdk_window_xid_at (list[i], 0, 0, x, y, excludes, excl_child)) == 0)
+ continue;
+
+ if (excludes)
+ {
+ if (!g_list_find(excludes,(gpointer *)child))
+ {
+ XFree(list);
+ XUngrabServer(disp);
+ return child;
+ }
+ }
+ else
+ {
+ XFree(list);
+ XUngrabServer(disp);
+ return child;
+ }
+ } while (--i > 0);
XFree(list);
}
XUngrabServer(disp);