don't wipe out window_private's x and y coordinates if the configure

Sat Feb  7 02:29:01 1998  Tim Janik  <timj@gimp.org>

        * gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
          and y coordinates if the configure notify is only about resizing,
          query the correct origin instead.
This commit is contained in:
Tim Janik 1998-02-07 02:26:09 +00:00 committed by Tim Janik
parent 5b597c65c7
commit edad08addd
11 changed files with 128 additions and 40 deletions

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -1,3 +1,9 @@
Sat Feb 7 02:29:01 1998 Tim Janik <timj@gimp.org>
* gdk/gdk.c (gdk_event_translate): don't wipe out window_private's x
and y coordinates if the configure notify is only about resizing,
query the correct origin instead.
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they

View File

@ -2469,10 +2469,15 @@ gdk_event_translate (GdkEvent *event,
/*XSync (gdk_display, 0)*/;
if (gdk_show_events)
g_print ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d\n",
g_print ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d\n",
xevent->xconfigure.window - base_id,
xevent->xconfigure.x, xevent->xconfigure.y,
xevent->xconfigure.width, xevent->xconfigure.height);
xevent->xconfigure.x,
xevent->xconfigure.y,
xevent->xconfigure.width,
xevent->xconfigure.height,
xevent->xconfigure.border_width,
xevent->xconfigure.above - base_id,
xevent->xconfigure.override_redirect);
if (window_private)
{
@ -2480,19 +2485,38 @@ gdk_event_translate (GdkEvent *event,
gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window);
if ((window_private->window_type != GDK_WINDOW_CHILD) &&
((window_private->width != xevent->xconfigure.width) ||
(window_private->height != xevent->xconfigure.height)))
if (window_private->window_type != GDK_WINDOW_CHILD)
{
event->configure.type = GDK_CONFIGURE;
event->configure.window = window;
event->configure.x = xevent->xconfigure.x;
event->configure.y = xevent->xconfigure.y;
event->configure.width = xevent->xconfigure.width;
event->configure.height = xevent->xconfigure.height;
window_private->x = xevent->xconfigure.x;
window_private->y = xevent->xconfigure.y;
if (!xevent->xconfigure.x &&
!xevent->xconfigure.y)
{
gint tx = 0;
gint ty = 0;
Window child_window = 0;
if (!XTranslateCoordinates (window_private->xdisplay,
window_private->xwindow,
gdk_root_window,
0, 0,
&tx, &ty,
&child_window))
g_warning ("GdkWindow %ld doesn't share root windows display?",
window_private->xwindow - base_id);
event->configure.x = tx;
event->configure.y = ty;
}
else
{
event->configure.x = xevent->xconfigure.x;
event->configure.y = xevent->xconfigure.y;
}
window_private->x = event->configure.x;
window_private->y = event->configure.y;
window_private->width = xevent->xconfigure.width;
window_private->height = xevent->xconfigure.height;
if (window_private->resize_count > 1)

View File

@ -957,7 +957,6 @@ gdk_window_get_size (GdkWindow *window,
*height = window_private->height;
}
GdkVisual*
gdk_window_get_visual (GdkWindow *window)
{

View File

@ -2469,10 +2469,15 @@ gdk_event_translate (GdkEvent *event,
/*XSync (gdk_display, 0)*/;
if (gdk_show_events)
g_print ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d\n",
g_print ("configure notify:\twindow: %ld x,y: %d %d w,h: %d %d b-w: %d above: %ld ovr: %d\n",
xevent->xconfigure.window - base_id,
xevent->xconfigure.x, xevent->xconfigure.y,
xevent->xconfigure.width, xevent->xconfigure.height);
xevent->xconfigure.x,
xevent->xconfigure.y,
xevent->xconfigure.width,
xevent->xconfigure.height,
xevent->xconfigure.border_width,
xevent->xconfigure.above - base_id,
xevent->xconfigure.override_redirect);
if (window_private)
{
@ -2480,19 +2485,38 @@ gdk_event_translate (GdkEvent *event,
gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window);
if ((window_private->window_type != GDK_WINDOW_CHILD) &&
((window_private->width != xevent->xconfigure.width) ||
(window_private->height != xevent->xconfigure.height)))
if (window_private->window_type != GDK_WINDOW_CHILD)
{
event->configure.type = GDK_CONFIGURE;
event->configure.window = window;
event->configure.x = xevent->xconfigure.x;
event->configure.y = xevent->xconfigure.y;
event->configure.width = xevent->xconfigure.width;
event->configure.height = xevent->xconfigure.height;
window_private->x = xevent->xconfigure.x;
window_private->y = xevent->xconfigure.y;
if (!xevent->xconfigure.x &&
!xevent->xconfigure.y)
{
gint tx = 0;
gint ty = 0;
Window child_window = 0;
if (!XTranslateCoordinates (window_private->xdisplay,
window_private->xwindow,
gdk_root_window,
0, 0,
&tx, &ty,
&child_window))
g_warning ("GdkWindow %ld doesn't share root windows display?",
window_private->xwindow - base_id);
event->configure.x = tx;
event->configure.y = ty;
}
else
{
event->configure.x = xevent->xconfigure.x;
event->configure.y = xevent->xconfigure.y;
}
window_private->x = event->configure.x;
window_private->y = event->configure.y;
window_private->width = xevent->xconfigure.width;
window_private->height = xevent->xconfigure.height;
if (window_private->resize_count > 1)

View File

@ -957,7 +957,6 @@ gdk_window_get_size (GdkWindow *window,
*height = window_private->height;
}
GdkVisual*
gdk_window_get_visual (GdkWindow *window)
{