From 5270c469a3d3eb82d4928abe3efa6fbbcccaf4b5 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 18 Mar 2014 10:31:17 -0400 Subject: [PATCH] window: Remove meta_window_set_gravity as "public" API --- src/core/window-private.h | 3 --- src/core/window.c | 40 +++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/core/window-private.h b/src/core/window-private.h index 19246989b..b199612a5 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -624,9 +624,6 @@ void meta_window_show_menu (MetaWindow *window, int button, guint32 timestamp); -void meta_window_set_gravity (MetaWindow *window, - int gravity); - #ifdef HAVE_XSYNC void meta_window_update_sync_request_counter (MetaWindow *window, gint64 new_counter_value); diff --git a/src/core/window.c b/src/core/window.c index 4a20adb97..2a52c8fb3 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -4431,6 +4431,26 @@ meta_window_update_monitor (MetaWindow *window) } } +static void +meta_window_set_gravity (MetaWindow *window, + int gravity) +{ + XSetWindowAttributes attrs; + + meta_verbose ("Setting gravity of %s to %d\n", window->desc, gravity); + + attrs.win_gravity = gravity; + + meta_error_trap_push (window->display); + + XChangeWindowAttributes (window->display->xdisplay, + window->xwindow, + CWWinGravity, + &attrs); + + meta_error_trap_pop (window->display); +} + static void meta_window_move_resize_internal (MetaWindow *window, MetaMoveResizeFlags flags, @@ -8536,26 +8556,6 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window, } } -void -meta_window_set_gravity (MetaWindow *window, - int gravity) -{ - XSetWindowAttributes attrs; - - meta_verbose ("Setting gravity of %s to %d\n", window->desc, gravity); - - attrs.win_gravity = gravity; - - meta_error_trap_push (window->display); - - XChangeWindowAttributes (window->display->xdisplay, - window->xwindow, - CWWinGravity, - &attrs); - - meta_error_trap_pop (window->display); -} - static void get_work_area_monitor (MetaWindow *window, MetaRectangle *area,