mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
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:
parent
5b597c65c7
commit
edad08addd
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
44
gdk/gdk.c
44
gdk/gdk.c
@ -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)
|
||||
|
@ -957,7 +957,6 @@ gdk_window_get_size (GdkWindow *window,
|
||||
*height = window_private->height;
|
||||
}
|
||||
|
||||
|
||||
GdkVisual*
|
||||
gdk_window_get_visual (GdkWindow *window)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -957,7 +957,6 @@ gdk_window_get_size (GdkWindow *window,
|
||||
*height = window_private->height;
|
||||
}
|
||||
|
||||
|
||||
GdkVisual*
|
||||
gdk_window_get_visual (GdkWindow *window)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user