2006-10-01 18:30:10 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
Comprehensively rename to Mutter
Code:
All references in the code not related to themes, keybindings, or
GConf were changed from 'metacity' to 'mutter'. This includes, among other
things, strings, comments, the atoms used in the message protocol, and
the envvars used for debugging. The GConf schema file was reduced to
the 3 settings new to mutter.
The overall version was brought up to 2.27 to match current gnome.
Structure:
All files named '*metacity*' were renamed '*mutter*' with appropriate
changes in the automake system. Files removed are
doc/creating_themes, src/themes, doc/metacity-theme.dtd,
metacity.doap. These files will eventually end up in an external
gnome-wm-data module.
Installation location:
On the filesystem the mutter-plugindir was change from
$(libdir)/metacity/plugins/clutter to just $(libdir)/mutter/plugins.
The mutter-plugins.pc.in reflects these changes.
Note:
mutter.desktop.in and mutter-wm.desktop both continue to have
X-GNOME-WMSettingsModule=metacity set. This allows
gnome-control-center to continue using libmetacity.so for
configuration. This is fine since most the general keybindings and wm
settings are being read from /apps/metacity/* in gconf.
2009-06-10 06:29:20 -04:00
|
|
|
/* Mutter interface used by GTK+ UI to talk to core */
|
2001-06-17 15:53:45 -04:00
|
|
|
|
2014-05-02 09:34:02 -04:00
|
|
|
/*
|
2001-06-17 15:53:45 -04:00
|
|
|
* Copyright (C) 2001 Havoc Pennington
|
2004-02-22 20:48:29 -05:00
|
|
|
* Copyright (C) 2003 Rob Adams
|
2006-01-10 14:43:21 -05:00
|
|
|
* Copyright (C) 2004-2006 Elijah Newren
|
2014-05-02 09:34:02 -04:00
|
|
|
*
|
2001-06-17 15:53:45 -04:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
2014-05-02 09:34:02 -04:00
|
|
|
*
|
2001-06-17 15:53:45 -04:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-11 20:42:06 -05:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2001-06-17 15:53:45 -04:00
|
|
|
*/
|
|
|
|
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "config.h"
|
2001-06-17 15:53:45 -04:00
|
|
|
|
2019-10-13 10:47:47 -04:00
|
|
|
#include "x11/meta-x11-window-control.h"
|
|
|
|
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "core/frame.h"
|
|
|
|
#include "core/meta-workspace-manager-private.h"
|
|
|
|
#include "core/util-private.h"
|
|
|
|
#include "core/workspace-private.h"
|
|
|
|
#include "meta/meta-x11-errors.h"
|
|
|
|
#include "meta/prefs.h"
|
2017-08-26 12:56:44 -04:00
|
|
|
#include "x11/meta-x11-display-private.h"
|
2014-05-20 17:47:10 -04:00
|
|
|
#include "x11/window-x11-private.h"
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "x11/window-x11.h"
|
2014-05-20 17:47:10 -04:00
|
|
|
|
2006-04-28 12:54:52 -04:00
|
|
|
static MetaWindow *
|
2019-10-14 05:32:54 -04:00
|
|
|
window_from_frame (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow)
|
2001-06-17 23:24:25 -04:00
|
|
|
{
|
|
|
|
MetaWindow *window;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2019-10-14 05:32:54 -04:00
|
|
|
window = meta_x11_display_lookup_x_window (x11_display, frame_xwindow);
|
|
|
|
if (!window || !window->frame)
|
2006-04-28 12:54:52 -04:00
|
|
|
{
|
|
|
|
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return window;
|
|
|
|
}
|
|
|
|
|
2001-06-18 02:11:53 -04:00
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_queue_frame_resize (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow)
|
2001-06-18 02:11:53 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2001-06-18 02:11:53 -04:00
|
|
|
|
Refactor thrice-duplicated queue code in window.c. Closes #376760.
2007-06-10 Thomas Thurman <thomas@thurman.org.uk>
Refactor thrice-duplicated queue code in window.c. Closes #376760.
* src/window.c (meta_window_queue, meta_window_unqueue):
New functions.
* src/window.[ch] (meta_window_unqueue_*, meta_window_queue_*):
Removed functions.
* src/window.c (meta_window_new_with_attrs, meta_window_free,
meta_window_flush_calc_showing, queue_calc_showing_func,
meta_window_minimize, meta_window_unminimize, meta_window_maximize,
meta_window_make_fullscreen, meta_window_shade,
meta_window_unshade, meta_window_move_resize_internal,
window_stick_impl, window_unstick_impl,
meta_window_client_message, process_property_notify): Modified to
use new queueing functions.
* src/window.c (idle_move_resize, idle_update_icon,
idle_calc_showing): update to receive queue number from pointer.
* src/window.h (MetaQueueType): new enum.
* src/window.h (MetaWindow): *_queued replaced with is_in_queue
bitfield.
* src/core.c (meta_core_queue_frame_resize):
* src/display.c (event_callback,
meta_display_queue_retheme_all_windows): Using new queueing functions.
* src/frame.c (meta_window_destroy_frame): Using new queueing functions.
* src/screen.c (queue_resize, meta_screen_resize_func,
queue_windows_showing): Using new queueing functions.
* src/window-props.c (reload_mwm_hints, reload_wm_hints,
reload_transient_for): Using new queueing functions.
* src/workspace.c (meta_workspace_add_window,
meta_workspace_remove_window, meta_workspace_queue_calc_showing,
meta_workspace_invalidate_work_area): Using new queueing functions.
svn path=/trunk/; revision=3236
2007-06-10 21:15:33 -04:00
|
|
|
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
2013-11-15 17:37:50 -05:00
|
|
|
meta_window_frame_size_changed (window);
|
2001-06-18 02:11:53 -04:00
|
|
|
}
|
|
|
|
|
2010-09-10 21:00:15 -04:00
|
|
|
static gboolean
|
|
|
|
lower_window_and_transients (MetaWindow *window,
|
|
|
|
gpointer data)
|
2002-10-11 14:42:40 -04:00
|
|
|
{
|
2017-08-27 15:02:40 -04:00
|
|
|
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
|
|
|
|
2002-10-11 14:42:40 -04:00
|
|
|
meta_window_lower (window);
|
2004-09-15 20:06:38 -04:00
|
|
|
|
2010-09-10 21:00:15 -04:00
|
|
|
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
|
|
|
|
|
2014-12-29 01:36:27 -05:00
|
|
|
if (meta_prefs_get_raise_on_click ())
|
2004-09-15 20:06:38 -04:00
|
|
|
{
|
|
|
|
/* Move window to the back of the focusing workspace's MRU list.
|
|
|
|
* Do extra sanity checks to avoid possible race conditions.
|
|
|
|
* (Borrowed from window.c.)
|
|
|
|
*/
|
2017-08-27 15:02:40 -04:00
|
|
|
if (workspace_manager->active_workspace &&
|
2014-05-02 09:34:02 -04:00
|
|
|
meta_window_located_on_workspace (window,
|
2017-08-27 15:02:40 -04:00
|
|
|
workspace_manager->active_workspace))
|
2004-09-15 20:06:38 -04:00
|
|
|
{
|
|
|
|
GList* link;
|
2017-08-27 15:02:40 -04:00
|
|
|
link = g_list_find (workspace_manager->active_workspace->mru_list,
|
2004-09-15 20:06:38 -04:00
|
|
|
window);
|
|
|
|
g_assert (link);
|
|
|
|
|
2017-08-27 15:02:40 -04:00
|
|
|
workspace_manager->active_workspace->mru_list =
|
|
|
|
g_list_remove_link (workspace_manager->active_workspace->mru_list,
|
2004-09-15 20:06:38 -04:00
|
|
|
link);
|
|
|
|
g_list_free (link);
|
|
|
|
|
2017-08-27 15:02:40 -04:00
|
|
|
workspace_manager->active_workspace->mru_list =
|
|
|
|
g_list_append (workspace_manager->active_workspace->mru_list,
|
2004-09-15 20:06:38 -04:00
|
|
|
window);
|
|
|
|
}
|
|
|
|
}
|
2004-10-08 18:34:34 -04:00
|
|
|
|
2010-09-10 21:00:15 -04:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_user_lower_and_unfocus (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow,
|
|
|
|
uint32_t timestamp)
|
2010-09-10 21:00:15 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2017-08-27 15:02:40 -04:00
|
|
|
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
2010-09-10 21:00:15 -04:00
|
|
|
|
|
|
|
lower_window_and_transients (window, NULL);
|
|
|
|
|
|
|
|
/* Rather than try to figure that out whether we just lowered
|
|
|
|
* the focus window, assume that's always the case. (Typically,
|
|
|
|
* this will be invoked via keyboard action or by a mouse action;
|
|
|
|
* in either case the window or a modal child will have been focused.) */
|
2017-08-27 15:02:40 -04:00
|
|
|
meta_workspace_focus_default_window (workspace_manager->active_workspace,
|
2010-09-10 21:00:15 -04:00
|
|
|
NULL,
|
|
|
|
timestamp);
|
2002-10-11 14:42:40 -04:00
|
|
|
}
|
|
|
|
|
2008-03-02 20:58:54 -05:00
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_toggle_maximize_vertically (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow)
|
2008-03-02 20:58:54 -05:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2008-03-02 20:58:54 -05:00
|
|
|
|
|
|
|
if (meta_prefs_get_raise_on_click ())
|
|
|
|
meta_window_raise (window);
|
|
|
|
|
|
|
|
if (META_WINDOW_MAXIMIZED_VERTICALLY (window))
|
2014-03-13 18:32:20 -04:00
|
|
|
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL);
|
2008-03-02 20:58:54 -05:00
|
|
|
else
|
2014-03-13 18:32:20 -04:00
|
|
|
meta_window_maximize (window, META_MAXIMIZE_VERTICAL);
|
2008-03-02 20:58:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_toggle_maximize_horizontally (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow)
|
2008-03-02 20:58:54 -05:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2008-03-02 20:58:54 -05:00
|
|
|
|
|
|
|
if (meta_prefs_get_raise_on_click ())
|
|
|
|
meta_window_raise (window);
|
|
|
|
|
|
|
|
if (META_WINDOW_MAXIMIZED_HORIZONTALLY (window))
|
2014-03-13 18:32:20 -04:00
|
|
|
meta_window_unmaximize (window, META_MAXIMIZE_HORIZONTAL);
|
2008-03-02 20:58:54 -05:00
|
|
|
else
|
2014-03-13 18:32:20 -04:00
|
|
|
meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL);
|
2008-03-02 20:58:54 -05:00
|
|
|
}
|
|
|
|
|
2002-10-18 17:22:27 -04:00
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_toggle_maximize (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow)
|
2002-10-18 17:22:27 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2002-10-18 17:22:27 -04:00
|
|
|
|
2006-04-15 22:20:41 -04:00
|
|
|
if (meta_prefs_get_raise_on_click ())
|
|
|
|
meta_window_raise (window);
|
|
|
|
|
Merge of all the changes on the constraints_experiments branch. This is
2005-11-18 Elijah Newren <newren@gmail.com>
Merge of all the changes on the constraints_experiments branch.
This is just a summary, to get the full ChangeLog of those
changes (approx. 2000 lines):
cvs -q -z3 update -Pd -r constraints_experiments
cvs -q -z3 diff -pu -r CONSTRAINTS_EXPERIMENTS_BRANCHPOINT ChangeLog
Bugs fixed:
unfiled - constraints.c is overly complicated[1]
unfiled - constraints.c is not robust when all constraints
cannot simultaneously be met (constraints need to be
prioritized)
unfiled - keep-titlebar-onscreen constraint is decoration
unaware (since get_outermost_onscreen_positions()
forgets to include decorations)
unfiled - keyboard snap-moving and snap-resizing snap to hidden
edges
109553 - gravity w/ simultaneous move & resize doesn't work
113601 - maximize vertical and horizontal should toggle and be
constrained
122196 - windows show up under vertical panels
122670 - jerky/random resizing of window via keyboard[2]
124582 - keyboard and mouse snap-resizing and snap-moving
erroneously moves the window multidimensionally
136307 - don't allow apps to resize themselves off the screen
(*cough* filechooser *cough*)
142016, 143784 - windows should not span multiple xineramas
unless placed there by the user
143145 - clamp new windows to screensize and force them
onscreen, if they'll fit
144126 - Handle pathological strut lists sanely[3]
149867 - fixed aspect ratio windows are difficult to resize[4]
152898 - make screen edges consistent; allow easy slamming of
windows into the left, right, and bottom edges of the
screen too.
154706 - bouncing weirdness at screen edge with keyboard moving
or resizing
156699 - avoid struts when placing windows, if possible (nasty
a11y blocker)
302456 - dragging offscreen too restrictive
304857 - wireframe moving off the top of the screen is misleading
308521 - make uni-directional resizing easier with
alt-middle-drag and prevent the occasional super
annoying resize-the-wrong-side(s) behavior
312007 - snap-resize moves windows with a minimum size
constraint
312104 - resizing the top of a window can cause the bottom to
grow
319351 - don't instantly snap on mouse-move-snapping, remove
braindeadedness of having order of releasing shift and
releasing button press matter so much
[1] fixed in my opinion, anyway.
[2] Actually, it's not totally fixed--it's just annoying
instead of almost completely unusable. Matthias had a
suggestion that may fix the remainder of the problems (see
http://tinyurl.com/bwzuu).
[3] This bug was originally about not-quite-so-pathological
cases but was left open for the worse cases. The code from
the branch handles the remainder of the cases mentioned in
this bug.
[4] Actually, although it's far better there's still some minor
issues left: a slight drift that's only noticeable after
lots of resizing, and potential problems with partially
onscreen constraints due to not clearing any
fixed_directions flags (aspect ratio windows get resized in
both directions and thus aren't fixed in one of them)
New feature:
81704 - edge resistance for user move and resize operations;
in particular 3 different kinds of resistance are
implemented:
Pixel-Distance: window movement is resisted when it
aligns with an edge unless the movement is greater than
a threshold number of pixels
Timeout: window movement past an edge is prevented until
a certain amount of time has elapsed during the
operation since the first request to move it past that
edge
Keyboard-Buildup: when moving or resizing with the
keyboard, once a window is aligned with a certain edge
it cannot move past until the correct direction has
been pressed enough times (e.g. 2 or 3 times)
Major changes:
- constraints.c has been rewritten; very few lines of code from
the old version remain. There is a comment near the top of
the function explaining the basics of how the new framework
works. A more detailed explanation can be found in
doc/how-constraints-works.txt
- edge-resistance.[ch] are new files implementing edge-resistance.
- boxes.[ch] are new files containing low-level error-prone
functions used heavily in constraints.c and edge-resistance.c,
among various places throughout the code. testboxes.c
contains a thorough testsuite for the boxes.[ch] functions
compiled into a program, testboxes.
- meta_window_move_resize_internal() *must* be told the gravity
of the associated operation (if it's just a move operation,
the gravity will be ignored, but for resize and move+resize
the correct value is needed)
- the craziness of different values that
meta_window_move_resize_internal() accepts has been documented
in a large comment at the beginning of the function. It may
be possible to clean this up some, but until then things will
remain as they were before--caller beware.
- screen and xinerama usable areas (i.e. places not covered by
e.g. panels) are cached in the workspace now, as are the
screen and xinerama edges. These get updated with the
workarea in src/workspace.c:ensure_work_areas_validated()
2005-11-19 09:58:50 -05:00
|
|
|
if (META_WINDOW_MAXIMIZED (window))
|
2014-03-13 18:32:20 -04:00
|
|
|
meta_window_unmaximize (window, META_MAXIMIZE_BOTH);
|
2002-10-18 17:22:27 -04:00
|
|
|
else
|
2014-03-13 18:32:20 -04:00
|
|
|
meta_window_maximize (window, META_MAXIMIZE_BOTH);
|
2001-06-20 23:40:14 -04:00
|
|
|
}
|
|
|
|
|
2001-06-23 01:49:35 -04:00
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_show_window_menu (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
int root_x,
|
|
|
|
int root_y,
|
|
|
|
uint32_t timestamp)
|
2001-06-23 01:49:35 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2014-05-02 09:34:02 -04:00
|
|
|
|
Add a raise on click option, basically only because all the major distros
2006-01-10 Elijah Newren <newren@gmail.com>
Add a raise on click option, basically only because all the major
distros are patching it in anyway. See #326156.
* src/metacity.schemas.in: add the new gconf key and explanation
* src/prefs.[ch] (#define KEY_RAISE_ON_CLICK, static gboolean
raise_on_click, update_raise_on_click, meta_prefs_init,
change_notify, meta_prefs_get_raise_on_click,
meta_preference_to_string):
Add all the normal preference handling stuff for this new
raise-on-click option.
* src/core.c (meta_core_show_window_menu):
* src/display.c (event_callback, meta_display_begin_grab_op):
* src/window.c (window_activate, meta_window_configure_request, ):
Only raise the window if in raise_on_click mode.
* src/display.c (meta_display_begin_grab_op,
meta_display_end_grab_op, meta_display_check_threshold_reached):
* src/display.h (struct MetaDisplay):
* src/window.c (meta_window_handle_mouse_grab_op_event):
if not in raise-on-click mode only raise on button release if the
click didn't start a move or resize operation; needs a few extra
MetaDisplay fields to handle this
* src/core.c (meta_core_user_lower_and_unfocus):
no need to do the MRU shuffling if not maintaining the stacking
order == MRU order invariant
* src/frames.c (meta_frames_button_press_event):
* src/window.c (meta_window_begin_grab_op):
remove an unneeded window raising that is already handled elsewhere
2006-01-10 14:35:03 -05:00
|
|
|
if (meta_prefs_get_raise_on_click ())
|
|
|
|
meta_window_raise (window);
|
2002-08-08 01:08:59 -04:00
|
|
|
meta_window_focus (window, timestamp);
|
|
|
|
|
2014-05-23 17:14:51 -04:00
|
|
|
meta_window_show_menu (window, menu, root_x, root_y);
|
2002-09-26 21:40:17 -04:00
|
|
|
}
|
|
|
|
|
2014-05-30 18:52:06 -04:00
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_show_window_menu_for_rect (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
MetaRectangle *rect,
|
|
|
|
uint32_t timestamp)
|
2014-05-30 18:52:06 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2014-05-30 18:52:06 -04:00
|
|
|
|
|
|
|
if (meta_prefs_get_raise_on_click ())
|
|
|
|
meta_window_raise (window);
|
|
|
|
meta_window_focus (window, timestamp);
|
|
|
|
|
|
|
|
meta_window_show_menu_for_rect (window, menu, rect);
|
|
|
|
}
|
|
|
|
|
2001-07-25 23:14:45 -04:00
|
|
|
gboolean
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_begin_grab_op (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow,
|
|
|
|
MetaGrabOp op,
|
|
|
|
gboolean pointer_already_grabbed,
|
|
|
|
gboolean frame_action,
|
|
|
|
int button,
|
|
|
|
gulong modmask,
|
|
|
|
uint32_t timestamp,
|
|
|
|
int root_x,
|
|
|
|
int root_y)
|
2001-07-25 23:14:45 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_xwindow);
|
2001-07-25 23:14:45 -04:00
|
|
|
MetaDisplay *display;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2019-10-14 05:32:54 -04:00
|
|
|
display = meta_x11_display_get_display (x11_display);
|
2001-07-25 23:14:45 -04:00
|
|
|
|
2017-08-26 15:43:17 -04:00
|
|
|
return meta_display_begin_grab_op (display, window,
|
2001-07-25 23:14:45 -04:00
|
|
|
op, pointer_already_grabbed,
|
2006-10-12 20:28:34 -04:00
|
|
|
frame_action,
|
2001-07-25 23:14:45 -04:00
|
|
|
button, modmask,
|
|
|
|
timestamp, root_x, root_y);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_end_grab_op (MetaX11Display *x11_display,
|
|
|
|
uint32_t timestamp)
|
2001-07-25 23:14:45 -04:00
|
|
|
{
|
|
|
|
MetaDisplay *display;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2019-10-14 05:32:54 -04:00
|
|
|
display = meta_x11_display_get_display (x11_display);
|
2001-07-25 23:14:45 -04:00
|
|
|
|
|
|
|
meta_display_end_grab_op (display, timestamp);
|
|
|
|
}
|
|
|
|
|
|
|
|
MetaGrabOp
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_get_grab_op (MetaX11Display *x11_display)
|
2001-07-25 23:14:45 -04:00
|
|
|
{
|
|
|
|
MetaDisplay *display;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2019-10-14 05:32:54 -04:00
|
|
|
display = meta_x11_display_get_display (x11_display);
|
2001-07-25 23:14:45 -04:00
|
|
|
|
|
|
|
return display->grab_op;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_grab_buttons (MetaX11Display *x11_display,
|
|
|
|
Window frame_xwindow)
|
2001-07-25 23:14:45 -04:00
|
|
|
{
|
|
|
|
MetaDisplay *display;
|
2014-05-02 09:34:02 -04:00
|
|
|
|
2019-10-14 05:32:54 -04:00
|
|
|
display = meta_x11_display_get_display (x11_display);
|
2002-08-04 16:20:53 -04:00
|
|
|
|
|
|
|
meta_verbose ("Grabbing buttons on frame 0x%lx\n", frame_xwindow);
|
2001-07-25 23:14:45 -04:00
|
|
|
meta_display_grab_window_buttons (display, frame_xwindow);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-10-14 05:32:54 -04:00
|
|
|
meta_x11_wm_set_screen_cursor (MetaX11Display *x11_display,
|
|
|
|
Window frame_on_screen,
|
|
|
|
MetaCursor cursor)
|
2001-07-25 23:14:45 -04:00
|
|
|
{
|
2019-10-14 05:32:54 -04:00
|
|
|
MetaWindow *window = window_from_frame (x11_display, frame_on_screen);
|
2001-07-25 23:14:45 -04:00
|
|
|
|
2002-08-23 14:00:40 -04:00
|
|
|
meta_frame_set_screen_cursor (window->frame, cursor);
|
2001-07-25 23:14:45 -04:00
|
|
|
}
|