only translate widget relative coordinates to window relative if the
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget relative coordinates to window relative if the widget is not a toplevel (i.e. it has ->parent != NULL), otherwise the area size gets screwed up for toplevels.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
|
||||
relative coordinates to window relative if the widget is not a toplevel
|
||||
(i.e. it has ->parent != NULL), otherwise the area size gets screwed up
|
||||
for toplevels.
|
||||
|
||||
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
|
||||
|
||||
* INSTALL
|
||||
|
||||
@@ -1852,27 +1852,30 @@ gtk_widget_queue_clear_area (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
gint wx, wy, wwidth, wheight;
|
||||
/* Translate widget relative to window-relative */
|
||||
|
||||
gdk_window_get_position (widget->window, &wx, &wy);
|
||||
x -= wx - widget->allocation.x;
|
||||
y -= wy - widget->allocation.y;
|
||||
|
||||
gdk_window_get_size (widget->window, &wwidth, &wheight);
|
||||
|
||||
if (x < 0)
|
||||
if (widget->parent)
|
||||
{
|
||||
width += x; x = 0;
|
||||
gint wx, wy, wwidth, wheight;
|
||||
/* Translate widget relative to window-relative */
|
||||
|
||||
gdk_window_get_position (widget->window, &wx, &wy);
|
||||
x -= wx - widget->allocation.x;
|
||||
y -= wy - widget->allocation.y;
|
||||
|
||||
gdk_window_get_size (widget->window, &wwidth, &wheight);
|
||||
|
||||
if (x < 0)
|
||||
{
|
||||
width += x; x = 0;
|
||||
}
|
||||
if (y < 0)
|
||||
{
|
||||
height += y; y = 0;
|
||||
}
|
||||
if (x + width > wwidth)
|
||||
width = wwidth - x;
|
||||
if (y + height > wheight)
|
||||
height = wheight - y;
|
||||
}
|
||||
if (y < 0)
|
||||
{
|
||||
height += y; y = 0;
|
||||
}
|
||||
if (x + width > wwidth)
|
||||
width = wwidth - x;
|
||||
if (y + height > wheight)
|
||||
height = wheight - y;
|
||||
|
||||
gtk_widget_queue_draw_data (widget, x, y, width, height, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user