mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Assume gravity works. (Anything else we have to take our chances with).
Mon Feb 2 19:04:17 2004 Soeren Sandmann <sandmann@daimi.au.dk> * gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else we have to take our chances with). (Bug 97510)
This commit is contained in:
parent
ff364586da
commit
d9d3cf5eda
12
ChangeLog
12
ChangeLog
@ -1,11 +1,21 @@
|
||||
Mon Feb 2 19:04:17 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
|
||||
we have to take our chances with).
|
||||
|
||||
(Bug 97510)
|
||||
|
||||
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Fix bug 110224.
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||
Remove unused variable 'result'
|
||||
|
||||
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them
|
||||
here.
|
||||
|
||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
|
@ -1,11 +1,21 @@
|
||||
Mon Feb 2 19:04:17 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
|
||||
we have to take our chances with).
|
||||
|
||||
(Bug 97510)
|
||||
|
||||
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Fix bug 110224.
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||
Remove unused variable 'result'
|
||||
|
||||
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them
|
||||
here.
|
||||
|
||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
|
@ -1,11 +1,21 @@
|
||||
Mon Feb 2 19:04:17 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
|
||||
we have to take our chances with).
|
||||
|
||||
(Bug 97510)
|
||||
|
||||
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Fix bug 110224.
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||
Remove unused variable 'result'
|
||||
|
||||
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them
|
||||
here.
|
||||
|
||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
|
@ -1,11 +1,21 @@
|
||||
Mon Feb 2 19:04:17 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
|
||||
we have to take our chances with).
|
||||
|
||||
(Bug 97510)
|
||||
|
||||
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Fix bug 110224.
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||
Remove unused variable 'result'
|
||||
|
||||
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them
|
||||
here.
|
||||
|
||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
|
@ -1,11 +1,21 @@
|
||||
Mon Feb 2 19:04:17 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
|
||||
we have to take our chances with).
|
||||
|
||||
(Bug 97510)
|
||||
|
||||
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
Fix bug 110224.
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||
Remove unused variable 'result'
|
||||
|
||||
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them
|
||||
here.
|
||||
|
||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
|
@ -190,7 +190,6 @@ gdk_display_open (const gchar *display_name)
|
||||
|
||||
display_x11->leader_window_title_set = FALSE;
|
||||
|
||||
display_x11->gravity_works = GDK_UNKNOWN;
|
||||
display_x11->have_render = GDK_UNKNOWN;
|
||||
|
||||
if (_gdk_synchronize)
|
||||
|
@ -77,7 +77,6 @@ struct _GdkDisplayX11
|
||||
|
||||
gboolean use_xshm;
|
||||
gboolean have_shm_pixmaps;
|
||||
GdkTristate gravity_works;
|
||||
GdkTristate have_render;
|
||||
|
||||
/* Information about current pointer and keyboard grabs held by this
|
||||
|
@ -78,7 +78,6 @@ const int _gdk_event_mask_table[21] =
|
||||
const int _gdk_nenvent_masks = sizeof (_gdk_event_mask_table) / sizeof (int);
|
||||
|
||||
/* Forward declarations */
|
||||
static gboolean gdk_window_gravity_works (GdkWindow *window);
|
||||
static void gdk_window_set_static_win_gravity (GdkWindow *window,
|
||||
gboolean on);
|
||||
static gboolean gdk_window_have_shape_ext (GdkDisplay *display);
|
||||
@ -4561,69 +4560,6 @@ gdk_window_merge_child_shapes (GdkWindow *window)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Support for windows that can be guffaw-scrolled
|
||||
* (See http://www.gtk.org/~otaylor/whitepapers/guffaw-scrolling.txt)
|
||||
*/
|
||||
|
||||
static gboolean
|
||||
gdk_window_gravity_works (GdkWindow *window)
|
||||
{
|
||||
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (window));
|
||||
|
||||
if (display_x11->gravity_works == GDK_UNKNOWN)
|
||||
{
|
||||
GdkWindowAttr attr;
|
||||
GdkWindow *parent;
|
||||
GdkWindow *child;
|
||||
gint y;
|
||||
|
||||
/* This particular server apparently has a bug so that the test
|
||||
* works but the actual code crashes it
|
||||
*/
|
||||
if ((!strcmp (XServerVendor (display_x11->xdisplay),
|
||||
"Sun Microsystems, Inc.")) &&
|
||||
(VendorRelease (display_x11->xdisplay) == 3400))
|
||||
{
|
||||
display_x11->gravity_works = GDK_NO;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
attr.window_type = GDK_WINDOW_TEMP;
|
||||
attr.wclass = GDK_INPUT_OUTPUT;
|
||||
attr.x = 0;
|
||||
attr.y = 0;
|
||||
attr.width = 100;
|
||||
attr.height = 100;
|
||||
attr.event_mask = 0;
|
||||
|
||||
parent = gdk_window_new (gdk_screen_get_root_window (GDK_DRAWABLE_SCREEN (window)),
|
||||
&attr, GDK_WA_X | GDK_WA_Y);
|
||||
|
||||
attr.window_type = GDK_WINDOW_CHILD;
|
||||
child = gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
|
||||
|
||||
gdk_window_set_static_win_gravity (child, TRUE);
|
||||
|
||||
gdk_window_resize (parent, 100, 110);
|
||||
|
||||
gdk_window_move (parent, 0, -10);
|
||||
gdk_window_move_resize (parent, 0, 0, 100, 100);
|
||||
|
||||
gdk_window_resize (parent, 100, 110);
|
||||
gdk_window_move (parent, 0, -10);
|
||||
gdk_window_move_resize (parent, 0, 0, 100, 100);
|
||||
|
||||
gdk_window_get_geometry (child, NULL, &y, NULL, NULL, NULL);
|
||||
|
||||
gdk_window_destroy (parent);
|
||||
gdk_window_destroy (child);
|
||||
|
||||
display_x11->gravity_works = ((y == -20) ? GDK_YES : GDK_NO);
|
||||
}
|
||||
|
||||
return (display_x11->gravity_works == GDK_YES);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_set_static_bit_gravity (GdkWindow *window, gboolean on)
|
||||
{
|
||||
@ -4683,10 +4619,7 @@ gdk_window_set_static_gravities (GdkWindow *window,
|
||||
|
||||
if (!use_static == !private->guffaw_gravity)
|
||||
return TRUE;
|
||||
|
||||
if (use_static && !gdk_window_gravity_works (window))
|
||||
return FALSE;
|
||||
|
||||
|
||||
private->guffaw_gravity = use_static;
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
|
Loading…
Reference in New Issue
Block a user