Commit 63955ec2 authored by Federico Mena's avatar Federico Mena Committed by Arturo Espinosa

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.
parent 077b5109
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:
......
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:
......
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:
......
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:
......
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:
......
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:
......
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:
......
......@@ -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);
......
......@@ -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);
......
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