forked from AuroraMiddleware/gtk
gdk: Deprecate static gravities
... and remove all implementations. The API allows to not work "if the server doesn't support it. So from now on, no server does!
This commit is contained in:
parent
dadc37e64d
commit
5e4672092a
@ -987,13 +987,6 @@ gdk_broadway_window_end_paint (GdkWindow *window)
|
||||
impl->dirty = TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_window_broadway_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
typedef struct _MoveResizeData MoveResizeData;
|
||||
|
||||
struct _MoveResizeData
|
||||
@ -1509,7 +1502,6 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
|
||||
impl_class->get_device_state = gdk_window_broadway_get_device_state;
|
||||
impl_class->shape_combine_region = gdk_window_broadway_shape_combine_region;
|
||||
impl_class->input_shape_combine_region = gdk_window_broadway_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_window_broadway_set_static_gravities;
|
||||
impl_class->destroy = _gdk_broadway_window_destroy;
|
||||
impl_class->destroy_foreign = gdk_broadway_window_destroy_foreign;
|
||||
impl_class->get_shape = gdk_broadway_window_get_shape;
|
||||
|
@ -219,7 +219,6 @@ struct _GdkWindow
|
||||
guint8 alpha;
|
||||
guint8 fullscreen_mode;
|
||||
|
||||
guint guffaw_gravity : 1;
|
||||
guint input_only : 1;
|
||||
guint modal_hint : 1;
|
||||
guint composited : 1;
|
||||
|
@ -515,13 +515,6 @@ gdk_offscreen_window_input_shape_combine_region (GdkWindow *window,
|
||||
{
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_offscreen_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_offscreen_window_get_geometry (GdkWindow *window,
|
||||
gint *x,
|
||||
@ -703,7 +696,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
|
||||
impl_class->get_device_state = gdk_offscreen_window_get_device_state;
|
||||
impl_class->shape_combine_region = gdk_offscreen_window_shape_combine_region;
|
||||
impl_class->input_shape_combine_region = gdk_offscreen_window_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_offscreen_window_set_static_gravities;
|
||||
impl_class->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
|
||||
impl_class->destroy = gdk_offscreen_window_destroy;
|
||||
impl_class->destroy_foreign = NULL;
|
||||
|
@ -6488,27 +6488,22 @@ gdk_window_merge_child_input_shapes (GdkWindow *window)
|
||||
* @window: a #GdkWindow
|
||||
* @use_static: %TRUE to turn on static gravity
|
||||
*
|
||||
* Set the bit gravity of the given window to static, and flag it so
|
||||
* all children get static subwindow gravity. This is used if you are
|
||||
* implementing scary features that involve deep knowledge of the
|
||||
* windowing system. Don’t worry about it unless you have to.
|
||||
* Used to set the bit gravity of the given window to static, and flag
|
||||
* it so all children get static subwindow gravity. This is used if you
|
||||
* are implementing scary features that involve deep knowledge of the
|
||||
* windowing system. Don’t worry about it.
|
||||
*
|
||||
* Returns: %TRUE if the server supports static gravity
|
||||
* Returns: %FALSE
|
||||
*
|
||||
* Deprecated: 3.16: static gravities haven't worked on anything but X11
|
||||
* for a long time.
|
||||
*/
|
||||
gboolean
|
||||
gdk_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
GdkWindowImplClass *impl_class;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
if (gdk_window_has_impl (window))
|
||||
{
|
||||
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
||||
return impl_class->set_static_gravities (window, use_static);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -675,7 +675,7 @@ GdkWindowState gdk_window_get_state (GdkWindow *window);
|
||||
/* Set static bit gravity on the parent, and static
|
||||
* window gravity on all children.
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_16
|
||||
gboolean gdk_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static);
|
||||
|
||||
|
@ -121,9 +121,6 @@ struct _GdkWindowImplClass
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
|
||||
gboolean (* set_static_gravities) (GdkWindow *window,
|
||||
gboolean use_static);
|
||||
|
||||
/* Called before processing updates for a window. This gives the windowing
|
||||
* layer a chance to save the region for later use in avoiding duplicate
|
||||
* exposes.
|
||||
|
@ -2050,18 +2050,6 @@ gdk_quartz_window_set_accept_focus (GdkWindow *window,
|
||||
window->accept_focus = accept_focus != FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_window_quartz_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
if (GDK_WINDOW_DESTROYED (window) ||
|
||||
!WINDOW_IS_TOPLEVEL (window))
|
||||
return FALSE;
|
||||
|
||||
/* FIXME: Implement */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_window_set_focus_on_map (GdkWindow *window,
|
||||
gboolean focus_on_map)
|
||||
@ -2954,7 +2942,6 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
|
||||
impl_class->get_device_state = gdk_window_quartz_get_device_state;
|
||||
impl_class->shape_combine_region = gdk_window_quartz_shape_combine_region;
|
||||
impl_class->input_shape_combine_region = gdk_window_quartz_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_window_quartz_set_static_gravities;
|
||||
impl_class->destroy = gdk_quartz_window_destroy;
|
||||
impl_class->destroy_foreign = gdk_quartz_window_destroy_foreign;
|
||||
impl_class->get_shape = gdk_quartz_window_get_shape;
|
||||
|
@ -1407,13 +1407,6 @@ gdk_window_wayland_input_shape_combine_region (GdkWindow *window,
|
||||
gdk_wayland_window_sync_input_region (window);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_window_wayland_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_destroy (GdkWindow *window,
|
||||
gboolean recursing,
|
||||
@ -2076,7 +2069,6 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
|
||||
impl_class->get_device_state = gdk_window_wayland_get_device_state;
|
||||
impl_class->shape_combine_region = gdk_window_wayland_shape_combine_region;
|
||||
impl_class->input_shape_combine_region = gdk_window_wayland_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_window_wayland_set_static_gravities;
|
||||
impl_class->destroy = gdk_wayland_window_destroy;
|
||||
impl_class->destroy_foreign = gdk_window_wayland_destroy_foreign;
|
||||
impl_class->get_shape = gdk_wayland_window_get_shape;
|
||||
|
@ -2585,15 +2585,6 @@ _gdk_window_get_functions (GdkWindow *window,
|
||||
return (functions_set != NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_win32_window_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
|
||||
return !use_static;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_window_begin_resize_drag (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
@ -3394,7 +3385,6 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
|
||||
|
||||
impl_class->shape_combine_region = gdk_win32_window_shape_combine_region;
|
||||
impl_class->input_shape_combine_region = gdk_win32_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_win32_window_set_static_gravities;
|
||||
impl_class->destroy = gdk_win32_window_destroy;
|
||||
impl_class->destroy_foreign = gdk_win32_window_destroy_foreign;
|
||||
impl_class->get_shape = gdk_win32_window_get_shape;
|
||||
|
@ -99,8 +99,6 @@ const gint _gdk_x11_event_mask_table_size = G_N_ELEMENTS (_gdk_x11_event_mask_ta
|
||||
|
||||
/* Forward declarations */
|
||||
static void gdk_x11_window_apply_fullscreen_mode (GdkWindow *window);
|
||||
static void gdk_window_set_static_win_gravity (GdkWindow *window,
|
||||
gboolean on);
|
||||
static gboolean gdk_window_icon_name_set (GdkWindow *window);
|
||||
static void set_wm_name (GdkDisplay *display,
|
||||
Window xwindow,
|
||||
@ -1043,12 +1041,6 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
|
||||
|
||||
impl->override_redirect = xattributes.override_redirect;
|
||||
|
||||
if (window->parent->guffaw_gravity)
|
||||
{
|
||||
xattributes.win_gravity = StaticGravity;
|
||||
xattributes_mask |= CWWinGravity;
|
||||
}
|
||||
|
||||
/* Sanity checks */
|
||||
switch (window->window_type)
|
||||
{
|
||||
@ -1070,13 +1062,6 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
|
||||
xattributes.border_pixel = BlackPixel (xdisplay, x11_screen->screen_num);
|
||||
xattributes_mask |= CWBorderPixel | CWBackPixel;
|
||||
|
||||
if (window->guffaw_gravity)
|
||||
xattributes.bit_gravity = StaticGravity;
|
||||
else
|
||||
xattributes.bit_gravity = NorthWestGravity;
|
||||
|
||||
xattributes_mask |= CWBitGravity;
|
||||
|
||||
xattributes.colormap = _gdk_visual_get_x11_colormap (window->visual);
|
||||
xattributes_mask |= CWColormap;
|
||||
|
||||
@ -4575,68 +4560,6 @@ gdk_x11_window_get_input_shape (GdkWindow *window)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_set_static_bit_gravity (GdkWindow *window,
|
||||
gboolean on)
|
||||
{
|
||||
XSetWindowAttributes xattributes;
|
||||
guint xattributes_mask = 0;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (window->input_only)
|
||||
return;
|
||||
|
||||
xattributes.bit_gravity = StaticGravity;
|
||||
xattributes_mask |= CWBitGravity;
|
||||
xattributes.bit_gravity = on ? StaticGravity : ForgetGravity;
|
||||
XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window),
|
||||
CWBitGravity, &xattributes);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_set_static_win_gravity (GdkWindow *window,
|
||||
gboolean on)
|
||||
{
|
||||
XSetWindowAttributes xattributes;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
xattributes.win_gravity = on ? StaticGravity : NorthWestGravity;
|
||||
|
||||
XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window),
|
||||
CWWinGravity, &xattributes);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_window_x11_set_static_gravities (GdkWindow *window,
|
||||
gboolean use_static)
|
||||
{
|
||||
GList *tmp_list;
|
||||
|
||||
if (!use_static == !window->guffaw_gravity)
|
||||
return TRUE;
|
||||
|
||||
window->guffaw_gravity = use_static;
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
{
|
||||
gdk_window_set_static_bit_gravity (window, use_static);
|
||||
|
||||
tmp_list = window->children;
|
||||
while (tmp_list)
|
||||
{
|
||||
gdk_window_set_static_win_gravity (tmp_list->data, use_static);
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* From the WM spec */
|
||||
#define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0
|
||||
#define _NET_WM_MOVERESIZE_SIZE_TOP 1
|
||||
@ -5747,7 +5670,6 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
|
||||
impl_class->get_device_state = gdk_window_x11_get_device_state;
|
||||
impl_class->shape_combine_region = gdk_window_x11_shape_combine_region;
|
||||
impl_class->input_shape_combine_region = gdk_window_x11_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_window_x11_set_static_gravities;
|
||||
impl_class->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
|
||||
impl_class->destroy = gdk_x11_window_destroy;
|
||||
impl_class->destroy_foreign = gdk_x11_window_destroy_foreign;
|
||||
|
Loading…
Reference in New Issue
Block a user