2006-10-01 22:30:10 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
2008-08-18 10:25:17 +00:00
|
|
|
/**
|
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 10:29:20 +00:00
|
|
|
* \file window-private.h Windows which Mutter manages
|
2008-08-18 10:25:17 +00:00
|
|
|
*
|
|
|
|
* Managing X windows.
|
|
|
|
* This file contains methods on this class which are available to
|
|
|
|
* routines in core but not outside it. (See window.h for the routines
|
|
|
|
* which the rest of the world is allowed to use.)
|
|
|
|
*/
|
2001-05-30 15:36:31 +00:00
|
|
|
|
2014-05-02 13:34:02 +00:00
|
|
|
/*
|
2001-05-30 15:36:31 +00:00
|
|
|
* Copyright (C) 2001 Havoc Pennington
|
2002-12-10 03:23:04 +00:00
|
|
|
* Copyright (C) 2002 Red Hat, Inc.
|
2004-02-28 01:49:17 +00:00
|
|
|
* Copyright (C) 2003, 2004 Rob Adams
|
2006-01-10 19:43:21 +00:00
|
|
|
* Copyright (C) 2004-2006 Elijah Newren
|
2014-05-02 13:34:02 +00:00
|
|
|
*
|
2001-05-30 15:36:31 +00: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 13:34:02 +00:00
|
|
|
*
|
2001-05-30 15:36:31 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-12 01:42:06 +00:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2001-05-30 15:36:31 +00:00
|
|
|
*/
|
|
|
|
|
2008-05-19 00:00:09 +00:00
|
|
|
#ifndef META_WINDOW_PRIVATE_H
|
|
|
|
#define META_WINDOW_PRIVATE_H
|
2001-05-30 15:36:31 +00:00
|
|
|
|
2001-06-02 04:14:18 +00:00
|
|
|
#include <X11/Xutil.h>
|
2011-03-22 19:36:12 +00:00
|
|
|
#include <cairo.h>
|
2001-06-24 03:18:10 +00:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2014-03-19 01:22:58 +00:00
|
|
|
|
2018-07-10 08:36:24 +00:00
|
|
|
#include "backends/meta-logical-monitor.h"
|
|
|
|
#include "clutter/clutter.h"
|
|
|
|
#include "core/stack.h"
|
|
|
|
#include "meta/compositor.h"
|
|
|
|
#include "meta/meta-close-dialog.h"
|
|
|
|
#include "meta/util.h"
|
|
|
|
#include "meta/window.h"
|
2014-03-19 02:01:31 +00:00
|
|
|
#include "wayland/meta-wayland-types.h"
|
2018-07-10 08:36:24 +00:00
|
|
|
#include "x11/group-private.h"
|
2014-03-19 02:01:31 +00: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-11 01:15:33 +00:00
|
|
|
typedef struct _MetaWindowQueue MetaWindowQueue;
|
2002-08-12 21:32:13 +00:00
|
|
|
|
2018-12-19 08:04:25 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2006-01-10 05:44:40 +00:00
|
|
|
META_CLIENT_TYPE_UNKNOWN = 0,
|
|
|
|
META_CLIENT_TYPE_APPLICATION = 1,
|
|
|
|
META_CLIENT_TYPE_PAGER = 2,
|
|
|
|
META_CLIENT_TYPE_MAX_RECOGNIZED = 2
|
|
|
|
} MetaClientType;
|
|
|
|
|
2018-12-19 08:04:25 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
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-11 01:15:33 +00:00
|
|
|
META_QUEUE_CALC_SHOWING = 1 << 0,
|
|
|
|
META_QUEUE_MOVE_RESIZE = 1 << 1,
|
|
|
|
META_QUEUE_UPDATE_ICON = 1 << 2,
|
|
|
|
} MetaQueueType;
|
|
|
|
|
|
|
|
#define NUMBER_OF_QUEUES 3
|
|
|
|
|
2018-12-19 08:04:25 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2013-02-02 19:05:43 +00:00
|
|
|
_NET_WM_BYPASS_COMPOSITOR_HINT_AUTO = 0,
|
|
|
|
_NET_WM_BYPASS_COMPOSITOR_HINT_ON = 1,
|
|
|
|
_NET_WM_BYPASS_COMPOSITOR_HINT_OFF = 2,
|
|
|
|
} MetaBypassCompositorHintValue;
|
|
|
|
|
2014-03-19 14:30:12 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2014-12-15 21:28:47 +00:00
|
|
|
META_MOVE_RESIZE_CONFIGURE_REQUEST = 1 << 0,
|
2017-06-21 09:30:09 +00:00
|
|
|
META_MOVE_RESIZE_USER_ACTION = 1 << 1,
|
|
|
|
META_MOVE_RESIZE_MOVE_ACTION = 1 << 2,
|
|
|
|
META_MOVE_RESIZE_RESIZE_ACTION = 1 << 3,
|
|
|
|
META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4,
|
|
|
|
META_MOVE_RESIZE_STATE_CHANGED = 1 << 5,
|
|
|
|
META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
|
2019-06-13 08:35:35 +00:00
|
|
|
META_MOVE_RESIZE_UNFULLSCREEN = 1 << 7,
|
|
|
|
META_MOVE_RESIZE_FORCE_MOVE = 1 << 8,
|
|
|
|
META_MOVE_RESIZE_WAYLAND_STATE_CHANGED = 1 << 9,
|
|
|
|
META_MOVE_RESIZE_FORCE_UPDATE_MONITOR = 1 << 10,
|
2014-03-19 14:30:12 +00:00
|
|
|
} MetaMoveResizeFlags;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_MOVE_RESIZE_RESULT_MOVED = 1 << 0,
|
|
|
|
META_MOVE_RESIZE_RESULT_RESIZED = 1 << 1,
|
|
|
|
META_MOVE_RESIZE_RESULT_FRAME_SHAPE_CHANGED = 1 << 2,
|
window: Let implementations finish state changes
In the old, synchronous X.org world, we could assume that
a state change always meant a synchronizing the window
geometry right after. After firing an operation that
would change the window state, such as maximizing or
tiling the window,
With Wayland, however, this is not valid anymore, since
Wayland is asynchronous. In this scenario, we call
meta_window_move_resize_internal() twice: when the user
executes an state-changing operation, and when the server
ACKs this operation. This breaks the previous assumptions,
and as a consequence, it breaks the GNOME Shell animations
in Wayland.
The solution is giving the MetaWindow control over the time
when the window geometry is synchronized with the compositor.
That is done by introducing a new result flag. Wayland asks
for a compositor sync after receiving an ACK from the server,
while X11 asks for it right away.
Fixes #78
2018-04-18 02:42:33 +00:00
|
|
|
META_MOVE_RESIZE_RESULT_STATE_CHANGED = 1 << 3,
|
2014-03-19 14:30:12 +00:00
|
|
|
} MetaMoveResizeResultFlags;
|
2012-01-07 22:21:32 +00:00
|
|
|
|
2016-02-01 10:46:11 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_PLACEMENT_GRAVITY_NONE = 0,
|
|
|
|
META_PLACEMENT_GRAVITY_TOP = 1 << 0,
|
|
|
|
META_PLACEMENT_GRAVITY_BOTTOM = 1 << 1,
|
|
|
|
META_PLACEMENT_GRAVITY_LEFT = 1 << 2,
|
|
|
|
META_PLACEMENT_GRAVITY_RIGHT = 1 << 3,
|
|
|
|
} MetaPlacementGravity;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_PLACEMENT_ANCHOR_NONE = 0,
|
|
|
|
META_PLACEMENT_ANCHOR_TOP = 1 << 0,
|
|
|
|
META_PLACEMENT_ANCHOR_BOTTOM = 1 << 1,
|
|
|
|
META_PLACEMENT_ANCHOR_LEFT = 1 << 2,
|
|
|
|
META_PLACEMENT_ANCHOR_RIGHT = 1 << 3,
|
|
|
|
} MetaPlacementAnchor;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_NONE = 0,
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1 << 0,
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 1 << 1,
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X = 1 << 2,
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y = 1 << 3,
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_X = 1 << 4,
|
|
|
|
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 1 << 5,
|
|
|
|
} MetaPlacementConstraintAdjustment;
|
|
|
|
|
2018-08-24 10:54:50 +00:00
|
|
|
typedef enum _MetaWindowUpdateMonitorFlags
|
|
|
|
{
|
|
|
|
META_WINDOW_UPDATE_MONITOR_FLAGS_NONE = 0,
|
|
|
|
META_WINDOW_UPDATE_MONITOR_FLAGS_USER_OP = 1 << 0,
|
2018-08-24 10:56:31 +00:00
|
|
|
META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE = 1 << 1,
|
2018-08-24 10:54:50 +00:00
|
|
|
} MetaWindowUpdateMonitorFlags;
|
|
|
|
|
2016-02-01 10:46:11 +00:00
|
|
|
typedef struct _MetaPlacementRule
|
|
|
|
{
|
|
|
|
MetaRectangle anchor_rect;
|
|
|
|
MetaPlacementGravity gravity;
|
|
|
|
MetaPlacementAnchor anchor;
|
|
|
|
MetaPlacementConstraintAdjustment constraint_adjustment;
|
|
|
|
int offset_x;
|
|
|
|
int offset_y;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
} MetaPlacementRule;
|
|
|
|
|
2018-10-19 11:33:13 +00:00
|
|
|
typedef enum _MetaPlacementState
|
|
|
|
{
|
|
|
|
META_PLACEMENT_STATE_UNCONSTRAINED,
|
|
|
|
META_PLACEMENT_STATE_CONSTRAINED,
|
|
|
|
} MetaPlacementState;
|
|
|
|
|
2017-08-17 03:43:21 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_EDGE_CONSTRAINT_NONE = 0,
|
|
|
|
META_EDGE_CONSTRAINT_WINDOW = 1,
|
|
|
|
META_EDGE_CONSTRAINT_MONITOR = 2,
|
|
|
|
} MetaEdgeConstraint;
|
|
|
|
|
2001-05-30 15:36:31 +00:00
|
|
|
struct _MetaWindow
|
|
|
|
{
|
2008-11-07 09:57:00 +00:00
|
|
|
GObject parent_instance;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-05-31 06:42:58 +00:00
|
|
|
MetaDisplay *display;
|
2018-09-21 15:49:36 +00:00
|
|
|
uint64_t id;
|
2014-09-09 01:20:14 +00:00
|
|
|
guint64 stamp;
|
2016-12-01 07:15:52 +00:00
|
|
|
MetaLogicalMonitor *monitor;
|
Partially resolve the conflicting requirements of windows on multiple
2004-12-22 Elijah Newren <newren@gmail.com>
Partially resolve the conflicting requirements of windows on
multiple workspaces and hidden being a global quantity for windows
(fixes bug 156182; the remainder of the work is bug 87531 and is a
libwnck issue)
* src/display.c (event_callback):
* src/window.c (meta_window_visible_on_workspace, meta_window_unstick):
* src/workspace.c (meta_workspace_add_window,
meta_workspace_contains_window,
meta_workspace_queue_calc_showing):
* src/workspace.h:
Remove meta_workspace_contains_window, replace with simple
comparison utilizing window->workspace
* src/place.c (meta_window_place):
* src/window.c (meta_window_shares_some_workspace):
* src/window.h:
Remove meta_window_shares_some_workspace, replace with a simple
comparison utilizing window->workspace
* src/session.c (save_state),
* src/window.c (meta_window_new_with_attrs,
meta_window_apply_session_info, meta_window_free,
window_showing_on_its_workspace,
meta_window_change_workspace_without_transients,
meta_window_unstick, meta_window_set_current_workspace_hint,
meta_window_get_workspaces):
* src/window.h:
* src/workspace.c (meta_workspace_free, meta_workspace_add_window,
meta_workspace_remove_window):
Only one workspace now
2004-12-22 23:52:52 +00:00
|
|
|
MetaWorkspace *workspace;
|
2012-01-07 22:21:32 +00:00
|
|
|
MetaWindowClientType client_type;
|
|
|
|
MetaWaylandSurface *surface;
|
2001-05-30 15:36:31 +00:00
|
|
|
Window xwindow;
|
2001-05-31 06:42:58 +00:00
|
|
|
/* may be NULL! not all windows get decorated */
|
|
|
|
MetaFrame *frame;
|
|
|
|
int depth;
|
|
|
|
Visual *xvisual;
|
2001-06-02 04:14:18 +00:00
|
|
|
char *desc; /* used in debug spew */
|
2001-06-01 03:00:01 +00:00
|
|
|
char *title;
|
2001-06-04 06:17:52 +00:00
|
|
|
|
2015-01-01 04:39:36 +00:00
|
|
|
cairo_surface_t *icon;
|
|
|
|
cairo_surface_t *mini_icon;
|
2014-03-19 01:15:49 +00:00
|
|
|
|
2001-06-10 03:17:15 +00:00
|
|
|
MetaWindowType type;
|
2013-11-19 22:33:57 +00:00
|
|
|
|
2002-04-13 04:58:45 +00:00
|
|
|
/* NOTE these five are not in UTF-8, we just treat them as random
|
2001-06-09 21:58:30 +00:00
|
|
|
* binary data
|
|
|
|
*/
|
|
|
|
char *res_class;
|
|
|
|
char *res_name;
|
|
|
|
char *role;
|
|
|
|
char *sm_client_id;
|
2002-04-13 04:58:45 +00:00
|
|
|
char *wm_client_machine;
|
2011-11-25 23:42:41 +00:00
|
|
|
|
2002-12-01 03:58:04 +00:00
|
|
|
char *startup_id;
|
2010-01-18 10:12:17 +00:00
|
|
|
char *mutter_hints;
|
2017-09-26 21:22:43 +00:00
|
|
|
char *sandboxed_app_id;
|
2011-03-19 09:31:25 +00:00
|
|
|
char *gtk_theme_variant;
|
2012-01-17 18:27:10 +00:00
|
|
|
char *gtk_application_id;
|
|
|
|
char *gtk_unique_bus_name;
|
|
|
|
char *gtk_application_object_path;
|
|
|
|
char *gtk_window_object_path;
|
|
|
|
char *gtk_app_menu_object_path;
|
|
|
|
char *gtk_menubar_object_path;
|
2002-04-13 04:58:45 +00:00
|
|
|
|
|
|
|
int net_wm_pid;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-09 21:58:30 +00:00
|
|
|
Window xtransient_for;
|
|
|
|
Window xgroup_leader;
|
|
|
|
Window xclient_leader;
|
2013-09-16 12:44:37 +00:00
|
|
|
MetaWindow *transient_for;
|
2001-06-13 00:56:08 +00:00
|
|
|
|
|
|
|
/* Initial workspace property */
|
2014-05-02 13:34:02 +00:00
|
|
|
int initial_workspace;
|
|
|
|
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
/* Initial timestamp property */
|
2014-05-02 13:34:02 +00:00
|
|
|
guint32 initial_timestamp;
|
|
|
|
|
2008-11-23 19:28:40 +00:00
|
|
|
/* Whether this is an override redirect window or not */
|
|
|
|
guint override_redirect : 1;
|
|
|
|
|
2001-06-07 05:18:10 +00:00
|
|
|
/* Whether we're maximized */
|
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 14:58:50 +00:00
|
|
|
guint maximized_horizontally : 1;
|
|
|
|
guint maximized_vertically : 1;
|
2006-10-01 21:59:09 +00:00
|
|
|
|
|
|
|
/* Whether we have to maximize/minimize after placement */
|
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 14:58:50 +00:00
|
|
|
guint maximize_horizontally_after_placement : 1;
|
|
|
|
guint maximize_vertically_after_placement : 1;
|
2006-10-01 21:59:09 +00:00
|
|
|
guint minimize_after_placement : 1;
|
2001-06-08 02:17:48 +00:00
|
|
|
|
2017-09-27 12:53:54 +00:00
|
|
|
/* The current tile mode */
|
2018-10-24 09:54:44 +00:00
|
|
|
MetaTileMode tile_mode;
|
|
|
|
|
2016-01-10 14:16:09 +00:00
|
|
|
/* The last "full" maximized/unmaximized state. We need to keep track of
|
|
|
|
* that to toggle between normal/tiled or maximized/tiled states. */
|
|
|
|
guint saved_maximize : 1;
|
|
|
|
int tile_monitor_number;
|
2017-08-17 03:43:21 +00:00
|
|
|
|
2018-10-24 12:24:22 +00:00
|
|
|
struct {
|
|
|
|
MetaEdgeConstraint top;
|
|
|
|
MetaEdgeConstraint right;
|
|
|
|
MetaEdgeConstraint bottom;
|
|
|
|
MetaEdgeConstraint left;
|
|
|
|
} edge_constraints;
|
2010-06-24 18:41:28 +00:00
|
|
|
|
2017-09-27 12:37:57 +00:00
|
|
|
double tile_hfraction;
|
|
|
|
|
2018-10-17 14:55:18 +00:00
|
|
|
uint64_t preferred_output_winsys_id;
|
2017-08-17 03:43:21 +00:00
|
|
|
|
2001-06-08 02:17:48 +00:00
|
|
|
/* Whether we're shaded */
|
|
|
|
guint shaded : 1;
|
2001-06-10 03:17:15 +00:00
|
|
|
|
2002-02-23 22:58:02 +00:00
|
|
|
/* Whether we're fullscreen */
|
|
|
|
guint fullscreen : 1;
|
2008-11-17 02:57:20 +00:00
|
|
|
|
2014-03-18 17:53:42 +00:00
|
|
|
/* Whether the window is marked as urgent */
|
|
|
|
guint urgent : 1;
|
2009-11-20 08:51:19 +00:00
|
|
|
|
2008-11-17 02:57:20 +00:00
|
|
|
/* Area to cover when in fullscreen mode. If _NET_WM_FULLSCREEN_MONITORS has
|
|
|
|
* been overridden (via a client message), the window will cover the union of
|
|
|
|
* these monitors. If not, this is the single monitor which the window's
|
|
|
|
* origin is on. */
|
2016-11-29 09:50:17 +00:00
|
|
|
struct {
|
|
|
|
MetaLogicalMonitor *top;
|
|
|
|
MetaLogicalMonitor *bottom;
|
|
|
|
MetaLogicalMonitor *left;
|
|
|
|
MetaLogicalMonitor *right;
|
|
|
|
} fullscreen_monitors;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
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 14:58:50 +00:00
|
|
|
/* Whether we're trying to constrain the window to be fully onscreen */
|
|
|
|
guint require_fully_onscreen : 1;
|
|
|
|
|
2009-08-31 13:52:16 +00:00
|
|
|
/* Whether we're trying to constrain the window to be on a single monitor */
|
|
|
|
guint require_on_single_monitor : 1;
|
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 14:58:50 +00:00
|
|
|
|
2006-08-07 23:34:55 +00:00
|
|
|
/* Whether we're trying to constrain the window's titlebar to be onscreen */
|
|
|
|
guint require_titlebar_visible : 1;
|
|
|
|
|
2001-06-10 03:17:15 +00:00
|
|
|
/* Whether we're sticky in the multi-workspace sense
|
|
|
|
* (vs. the not-scroll-with-viewport sense, we don't
|
|
|
|
* have no stupid viewports)
|
|
|
|
*/
|
|
|
|
guint on_all_workspaces : 1;
|
2001-06-08 02:17:48 +00:00
|
|
|
|
2011-02-28 10:41:23 +00:00
|
|
|
/* This is true if the client requested sticky, and implies on_all_workspaces == TRUE,
|
|
|
|
* however on_all_workspaces can be set TRUE for other internal reasons too, such as
|
|
|
|
* being override_redirect or being on the non-primary monitor. */
|
|
|
|
guint on_all_workspaces_requested : 1;
|
|
|
|
|
2001-06-04 06:17:52 +00:00
|
|
|
/* Minimize is the state controlled by the minimize button */
|
|
|
|
guint minimized : 1;
|
2005-10-03 20:02:31 +00:00
|
|
|
guint tab_unminimized : 1;
|
2001-06-08 02:17:48 +00:00
|
|
|
|
2001-06-11 03:24:20 +00:00
|
|
|
/* Whether the window is mapped; actual server-side state
|
|
|
|
* see also unmaps_pending
|
|
|
|
*/
|
|
|
|
guint mapped : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2008-10-24 09:07:24 +00:00
|
|
|
/* Whether window has been hidden from view by lowering it to the bottom
|
|
|
|
* of window stack.
|
|
|
|
*/
|
|
|
|
guint hidden : 1;
|
|
|
|
|
2014-03-28 17:50:45 +00:00
|
|
|
/* Whether the compositor thinks the window is visible.
|
|
|
|
* This should match up with calls to meta_compositor_show_window /
|
|
|
|
* meta_compositor_hide_window.
|
Simplify relationship between mapping and visibility
Previously, changes to the visibility of a window could be indicated
by meta_compositor_map_window(), meta_compositor_unminimize_window(),
meta_compositor_set_window_hidden(), etc, with the exact behavior
depending on the 'live_hidden_windows' preference.
Simplify this so that visibility is controlled by:
meta_compositor_show_window()
meta_compositor_hide_window()
With an 'effect' parameter provided to indicate the appropriate
effect (CREATE/UNMINIMIZE/MINIMIZE/DESTROY/NONE.)
The map state of the window is signalled separately by:
meta_compositor_map_window()
meta_compositor_unmap_window()
And is used only to control resource handling.
Other changes:
* The desired effect on show/hide is explicitly stored in
MetaWindow, avoiding the need for the was_minimized flag.
At idle, once we calculate the window state, we pass the
effect to the compositor if it matches the new window
state, and then clear the effect to start over for future
map state changes.
* meta_compositor_switch_workspace() is called before any windows
are hidden or shown, allowing the compositor to avoid hiding
or showing an effect for windows involved in the switch.
http://bugzilla.gnome.org/show_bug.cgi?id=582341
* Handling of post-effect cleanups for MutterWindow are
simplified - instead of trying to do different things based
on the individual needs of different effects, we just wait until
all effects complete and sync the window state to what it
should be.
* On unmap, once we destroy the pixmap, we tell ClutterX11Pixmap
that we've done so, so it can clean up and unbind. (The
unbinding doesn't seem to be working properly because of
ClutterGLXPixmap or video driver issues.)
http://bugzilla.gnome.org/show_bug.cgi?id=587251
2009-06-28 21:10:40 +00:00
|
|
|
*/
|
|
|
|
guint visible_to_compositor : 1;
|
|
|
|
|
2014-03-28 17:50:45 +00:00
|
|
|
/* Whether the compositor knows about the window.
|
|
|
|
* This should match up with calls to meta_compositor_add_window /
|
|
|
|
* meta_compositor_remove_window.
|
|
|
|
*/
|
|
|
|
guint known_to_compositor : 1;
|
|
|
|
|
Simplify relationship between mapping and visibility
Previously, changes to the visibility of a window could be indicated
by meta_compositor_map_window(), meta_compositor_unminimize_window(),
meta_compositor_set_window_hidden(), etc, with the exact behavior
depending on the 'live_hidden_windows' preference.
Simplify this so that visibility is controlled by:
meta_compositor_show_window()
meta_compositor_hide_window()
With an 'effect' parameter provided to indicate the appropriate
effect (CREATE/UNMINIMIZE/MINIMIZE/DESTROY/NONE.)
The map state of the window is signalled separately by:
meta_compositor_map_window()
meta_compositor_unmap_window()
And is used only to control resource handling.
Other changes:
* The desired effect on show/hide is explicitly stored in
MetaWindow, avoiding the need for the was_minimized flag.
At idle, once we calculate the window state, we pass the
effect to the compositor if it matches the new window
state, and then clear the effect to start over for future
map state changes.
* meta_compositor_switch_workspace() is called before any windows
are hidden or shown, allowing the compositor to avoid hiding
or showing an effect for windows involved in the switch.
http://bugzilla.gnome.org/show_bug.cgi?id=582341
* Handling of post-effect cleanups for MutterWindow are
simplified - instead of trying to do different things based
on the individual needs of different effects, we just wait until
all effects complete and sync the window state to what it
should be.
* On unmap, once we destroy the pixmap, we tell ClutterX11Pixmap
that we've done so, so it can clean up and unbind. (The
unbinding doesn't seem to be working properly because of
ClutterGLXPixmap or video driver issues.)
http://bugzilla.gnome.org/show_bug.cgi?id=587251
2009-06-28 21:10:40 +00:00
|
|
|
/* When we next show or hide the window, what effect we should
|
|
|
|
* tell the compositor to perform.
|
|
|
|
*/
|
|
|
|
guint pending_compositor_effect : 4; /* MetaCompEffect */
|
|
|
|
|
2001-06-04 06:17:52 +00:00
|
|
|
/* Iconic is the state in WM_STATE; happens for workspaces/shading
|
|
|
|
* in addition to minimize
|
|
|
|
*/
|
2001-06-02 04:14:18 +00:00
|
|
|
guint iconic : 1;
|
2001-06-04 06:17:52 +00:00
|
|
|
/* initially_iconic is the WM_HINTS setting when we first manage
|
2001-06-06 04:47:37 +00:00
|
|
|
* the window. It's taken to mean initially minimized.
|
2001-06-04 06:17:52 +00:00
|
|
|
*/
|
|
|
|
guint initially_iconic : 1;
|
2001-06-24 06:47:54 +00:00
|
|
|
|
|
|
|
/* whether an initial workspace was explicitly set */
|
|
|
|
guint initial_workspace_set : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
/* whether an initial timestamp was explicitly set */
|
|
|
|
guint initial_timestamp_set : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
/* whether net_wm_user_time has been set yet */
|
|
|
|
guint net_wm_user_time_set : 1;
|
2013-02-01 10:32:53 +00:00
|
|
|
|
|
|
|
/* whether net_wm_icon_geometry has been set */
|
|
|
|
guint icon_geometry_set : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-04 04:58:22 +00:00
|
|
|
/* Globally active / No input */
|
|
|
|
guint input : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-23 18:30:27 +00:00
|
|
|
/* MWM hints about features of window */
|
|
|
|
guint mwm_decorated : 1;
|
2002-06-22 03:23:02 +00:00
|
|
|
guint mwm_border_only : 1;
|
2001-06-23 18:30:27 +00:00
|
|
|
guint mwm_has_close_func : 1;
|
|
|
|
guint mwm_has_minimize_func : 1;
|
|
|
|
guint mwm_has_maximize_func : 1;
|
|
|
|
guint mwm_has_move_func : 1;
|
|
|
|
guint mwm_has_resize_func : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-23 18:30:27 +00:00
|
|
|
/* Computed features of window */
|
2001-06-08 06:39:38 +00:00
|
|
|
guint decorated : 1;
|
2002-06-22 03:23:02 +00:00
|
|
|
guint border_only : 1;
|
2002-05-26 15:54:38 +00:00
|
|
|
guint always_sticky : 1;
|
2001-06-08 06:39:38 +00:00
|
|
|
guint has_close_func : 1;
|
|
|
|
guint has_minimize_func : 1;
|
|
|
|
guint has_maximize_func : 1;
|
2001-06-23 06:50:37 +00:00
|
|
|
guint has_shade_func : 1;
|
2001-06-23 18:30:27 +00:00
|
|
|
guint has_move_func : 1;
|
|
|
|
guint has_resize_func : 1;
|
2002-02-23 22:58:02 +00:00
|
|
|
guint has_fullscreen_func : 1;
|
2002-07-06 19:05:37 +00:00
|
|
|
|
|
|
|
/* Computed whether to skip taskbar or not */
|
|
|
|
guint skip_taskbar : 1;
|
|
|
|
guint skip_pager : 1;
|
2002-10-02 00:47:29 +00:00
|
|
|
|
|
|
|
/* TRUE if client set these */
|
|
|
|
guint wm_state_above : 1;
|
|
|
|
guint wm_state_below : 1;
|
Fix some support for EWMH hints, and fix USER_TIME support to include the
2004-07-31 Rob Adams <readams@readams.net>
Fix some support for EWMH hints, and fix USER_TIME support to
include the DEMANDS_ATTENTION hint. Also includes some code for
implementing _NET_RESTACK_WINDOW and _NET_MOVERESIZE_WINDOW, but
this is disabled pending feature thaw.
* COMPLIANCE: update with new information
* src/display.c (meta_display_open): add new hints to list
* src/display.h (_MetaDisplay): Add new atoms to struct
* src/screen.c (set_supported_hint): update the list of support
hints.
(set_desktop_viewport_hint): new function sets the viewport hint
to (0,0) as required by the spec for WMs with no viewport support.
(set_desktop_geometry_hint): new function to set the desktop size
hint to the size of the display, since we don't implement large
desktop support, as required by the spec.
(meta_screen_resize): update the geometry hint on screen resize
* src/window.c (meta_window_new_with_attrs): Initialize
demands_attention state
(set_net_wm_state): Set demands_attention hint in the window state
(meta_window_show): If we don't pop up a window because of
USER_TIME, set DEMANDS_ATTENTION on the window.
(meta_window_focus): When a window receives focus, remove
DEMANDS_ATTENTION hint
(meta_window_client_message): Allow other apps to set
DEMANDS_ATTENTION on a window. Also, if the _NET_ACTIVE_WINDOW
hint includes a timestamp, use it.
(update_net_wm_state): Read DEMANDS_ATTENTION state also
* src/window.h (_MetaWindow): add wm_state_demands_attention bit.
2004-07-31 19:56:10 +00:00
|
|
|
|
|
|
|
/* EWHH demands attention flag */
|
|
|
|
guint wm_state_demands_attention : 1;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2011-04-26 12:12:04 +00:00
|
|
|
/* TRUE iff window == window->display->focus_window */
|
2001-06-04 04:58:22 +00:00
|
|
|
guint has_focus : 1;
|
2011-03-25 01:36:47 +00:00
|
|
|
|
2001-06-22 03:20:21 +00:00
|
|
|
/* Have we placed this window? */
|
|
|
|
guint placed : 1;
|
|
|
|
|
2005-02-11 19:20:44 +00:00
|
|
|
/* Is this not a transient of the focus window which is being denied focus? */
|
|
|
|
guint denied_focus_and_not_transient : 1;
|
|
|
|
|
2004-12-28 06:01:42 +00:00
|
|
|
/* Has this window not ever been shown yet? */
|
|
|
|
guint showing_for_first_time : 1;
|
|
|
|
|
2008-11-07 09:57:00 +00:00
|
|
|
/* Are we in meta_window_unmanage()? */
|
2001-06-22 03:20:21 +00:00
|
|
|
guint unmanaging : 1;
|
|
|
|
|
deleted and moved into window-props.c (meta_window_new_with_attrs): added
2006-03-25 Thomas Thurman <thomas@thurman.org.uk>
* src/window.c, src/window.h (update_net_wm_state,
update_mwm_hints, update_wm_class, update_transient_for):
deleted and moved into window-props.c
(meta_window_new_with_attrs): added constructing field
and four new initial properties (as above)
(meta_window_recalc_features,
meta_window_recalc_window_type): new functions
* src/window-props.c (init_net_wm_state, reload_net_wm_state
init_mwm_hints, reload_mwm_hints, init_wm_class,
reload_mwm_class, init_transient_for, reload_transient_for):
new functions, moved in from window.c
(meta_display_init_window_prop_hooks): initialise new properties
2006-03-25 22:57:22 +00:00
|
|
|
/* Are we in meta_window_new()? */
|
|
|
|
guint constructing : 1;
|
2014-05-02 13:34:02 +00: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-11 01:15:33 +00:00
|
|
|
/* Are we in the various queues? (Bitfield: see META_WINDOW_IS_IN_QUEUE) */
|
|
|
|
guint is_in_queues : NUMBER_OF_QUEUES;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-23 05:49:35 +00:00
|
|
|
/* Used by keybindings.c */
|
2001-07-11 06:22:00 +00:00
|
|
|
guint keys_grabbed : 1; /* normal keybindings grabbed */
|
|
|
|
guint grab_on_frame : 1; /* grabs are on the frame */
|
|
|
|
guint all_keys_grabbed : 1; /* AnyKey grabbed */
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-23 18:30:27 +00:00
|
|
|
/* Set if the reason for unmanaging the window is that
|
|
|
|
* it was withdrawn
|
|
|
|
*/
|
|
|
|
guint withdrawn : 1;
|
2001-06-24 08:09:10 +00:00
|
|
|
|
|
|
|
/* TRUE if constrain_position should calc placement.
|
|
|
|
* only relevant if !window->placed
|
|
|
|
*/
|
|
|
|
guint calc_placement : 1;
|
2002-01-10 06:31:31 +00:00
|
|
|
|
2003-06-12 05:55:06 +00:00
|
|
|
/* if TRUE, window was maximized at start of current grab op */
|
|
|
|
guint shaken_loose : 1;
|
|
|
|
|
2003-10-13 20:15:40 +00:00
|
|
|
/* if TRUE we have a grab on the focus click buttons */
|
|
|
|
guint have_focus_click_grab : 1;
|
Fix bug 143333, support for update counter spec, and 109362, schedule
Sat Jun 19 02:21:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix bug 143333, support for update counter spec, and 109362,
schedule compensation events when events are ignored.
* src/display.c (meta_display_open): Add _NET_WM_SYNC_REQUEST and
_NET_WM_SYNC_REQUEST_COUNTER atoms. Remove the old
METACITY_SYNC_COUNTER stuff.
(meta_display_begin_op): Setup the sync counter
* src/xprops.c, src/xprops.h, src/window-props.c, src/display.h:
Add new atoms.
* src/window.c (send_sync_request): new function.
(meta_window_move_resize_internal): send a sync request before
resizing.
(check_move_resize_frequence): Rework logic to also check the SYNC
case. If an event is ignored return the remaining time.
(update_resize_timeout): Timeout that gets called when a
compensation event is scheduled.
(uddate_resize): schedule compensation events when an event is
ignored.
(meta_window_handle_mouse_grap_op_event): When an alarm is
received and sync was turned off, turn it back on.
* src/window.h (struct MetaWindow) Add some variables
2004-06-19 00:45:24 +00:00
|
|
|
|
|
|
|
/* if TRUE, application is buggy and SYNC resizing is turned off */
|
|
|
|
guint disable_sync : 1;
|
|
|
|
|
window: make determination of attached dialog windows more consistent
Different bits of code were using slightly different checks to test
whether a window was an attached dialog. Add a new
meta_window_is_attached_dialog(), and use that everywhere.
Also, freeze the is-attached status when the window is first shown,
rather than recomputing it each time the caller asks, since this could
cause problems if a window changes its type after it has already been
attached, etc. However, if an attached window's parent is destroyed,
or an attached window changes its transient-for, then fix things up by
destroying the old MetaWindow and creating a new one (causing
compositor unmap and map events to be fired off, allowing the display
of the window to be fixed up).
Remove some code in display.c that tried to fix existing windows if
the gconf setting changed, but which didn't actually do anything (at
least under gnome-shell). However, if 654643 was fixed then the new
behavior with this patch would be that changing the gconf setting
would affect new dialogs, but not existing ones.
https://bugzilla.gnome.org/show_bug.cgi?id=646761
2011-04-05 14:14:52 +00:00
|
|
|
/* if TRUE, window is attached to its parent */
|
|
|
|
guint attached : 1;
|
|
|
|
|
2013-02-20 20:17:21 +00:00
|
|
|
/* whether or not the window is from a program running on another machine */
|
|
|
|
guint is_remote : 1;
|
|
|
|
|
2018-08-21 22:58:06 +00:00
|
|
|
/* whether focus should be restored on map */
|
|
|
|
guint restore_focus_on_map : 1;
|
|
|
|
|
2011-03-22 19:36:12 +00:00
|
|
|
/* if non-NULL, the bounds of the window frame */
|
|
|
|
cairo_region_t *frame_bounds;
|
|
|
|
|
2014-05-20 21:47:10 +00:00
|
|
|
/* if non-NULL, the bounding shape region of the window. Relative to
|
|
|
|
* the server-side client window. */
|
2013-08-24 02:20:49 +00:00
|
|
|
cairo_region_t *shape_region;
|
|
|
|
|
2013-01-15 01:45:31 +00:00
|
|
|
/* if non-NULL, the opaque region _NET_WM_OPAQUE_REGION */
|
|
|
|
cairo_region_t *opaque_region;
|
|
|
|
|
2013-08-24 02:20:49 +00:00
|
|
|
/* the input shape region for picking */
|
|
|
|
cairo_region_t *input_region;
|
|
|
|
|
2014-04-10 06:41:22 +00:00
|
|
|
/* _NET_WM_WINDOW_OPACITY rescaled to 0xFF */
|
|
|
|
guint8 opacity;
|
2013-12-06 18:44:31 +00:00
|
|
|
|
2011-06-08 17:58:54 +00:00
|
|
|
/* if TRUE, the we have the new form of sync request counter which
|
|
|
|
* also handles application frames */
|
|
|
|
guint extended_sync_request_counter : 1;
|
|
|
|
|
2007-07-30 13:53:25 +00:00
|
|
|
/* Note: can be NULL */
|
|
|
|
GSList *struts;
|
|
|
|
|
2002-12-10 03:23:04 +00:00
|
|
|
/* XSync update counter */
|
Fix bug 143333, support for update counter spec, and 109362, schedule
Sat Jun 19 02:21:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix bug 143333, support for update counter spec, and 109362,
schedule compensation events when events are ignored.
* src/display.c (meta_display_open): Add _NET_WM_SYNC_REQUEST and
_NET_WM_SYNC_REQUEST_COUNTER atoms. Remove the old
METACITY_SYNC_COUNTER stuff.
(meta_display_begin_op): Setup the sync counter
* src/xprops.c, src/xprops.h, src/window-props.c, src/display.h:
Add new atoms.
* src/window.c (send_sync_request): new function.
(meta_window_move_resize_internal): send a sync request before
resizing.
(check_move_resize_frequence): Rework logic to also check the SYNC
case. If an event is ignored return the remaining time.
(update_resize_timeout): Timeout that gets called when a
compensation event is scheduled.
(uddate_resize): schedule compensation events when an event is
ignored.
(meta_window_handle_mouse_grap_op_event): When an alarm is
received and sync was turned off, turn it back on.
* src/window.h (struct MetaWindow) Add some variables
2004-06-19 00:45:24 +00:00
|
|
|
XSyncCounter sync_request_counter;
|
2011-06-08 17:58:54 +00:00
|
|
|
gint64 sync_request_serial;
|
2013-03-13 17:09:33 +00:00
|
|
|
gint64 sync_request_wait_serial;
|
2013-03-13 19:31:11 +00:00
|
|
|
guint sync_request_timeout_id;
|
2011-06-08 15:26:03 +00:00
|
|
|
/* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
|
|
|
|
XSyncAlarm sync_request_alarm;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2001-06-11 03:24:20 +00:00
|
|
|
/* Number of UnmapNotify that are caused by us, if
|
|
|
|
* we get UnmapNotify with none pending then the client
|
|
|
|
* is withdrawing the window.
|
|
|
|
*/
|
|
|
|
int unmaps_pending;
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
|
2019-06-24 13:10:22 +00:00
|
|
|
/* Number of XReparentWindow requests that we have queued.
|
|
|
|
*/
|
|
|
|
int reparents_pending;
|
|
|
|
|
2009-09-19 00:50:11 +00:00
|
|
|
/* See docs for meta_window_get_stable_sequence() */
|
|
|
|
guint32 stable_sequence;
|
|
|
|
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
/* set to the most recent user-interaction event timestamp that we
|
|
|
|
know about for this window */
|
Fix issues on 64-bit machines with timestamps by using guint32 (like gtk+
2006-09-13 Elijah Newren <newren gmail com>
* src/common.h (MetaWindowMenuFunc):
* src/core.[ch] (meta_core_user_lower_and_unfocus,
meta_core_user_focus, meta_core_show_window_menu,
meta_core_begin_grab_op, meta_core_end_grab_op):
* src/delete.c (delete_ping_reply_func, delete_ping_timeout_func,
meta_window_delete):
* src/display.[ch] (struct MetaDisplay, struct MetaPingData,
sanity_check_timestamps, meta_display_open, event_callback,
meta_spew_event, meta_display_set_grab_op_cursor,
meta_display_begin_grab_op, meta_display_end_grab_op,
meta_display_ping_timeout, meta_display_ping_window,
process_pong_message, timestamp_too_old,
meta_display_set_input_focus_window):
* src/keybindings.[ch] (grab_keyboard, ungrab_keyboard,
meta_screen_grab_all_keys, meta_window_grab_all_keys,
meta_window_ungrab_all_keys, error_on_generic_command,
error_on_command, error_on_terminal_command):
* src/metacity-dialog.c (on_realize, warn_about_no_sm_support,
error_about_command, main):
* src/screen.[ch] (struct _MetaScreen, meta_screen_new,
meta_screen_show_desktop, meta_screen_apply_startup_properties):
* src/session.c (warn_about_lame_clients_and_finish_interact):
* src/window.[ch] (struct _MetaWindow,
intervening_user_event_occurred, window_activate,
meta_window_delete, meta_window_focus,
meta_window_send_icccm_message, meta_window_client_message,
menu_callback, meta_window_show_menu, struct EventScannerData,
check_use_this_motion_notify, meta_window_begin_grab_op,
meta_window_set_user_time):
* src/workspace.[ch] (focus_ancestor_or_mru_window,
meta_workspace_activate_with_focus, meta_workspace_activate,
meta_workspace_focus_default_window,
focus_ancestor_or_mru_window):
Fix issues on 64-bit machines with timestamps by using guint32
(like gtk+ does) instead of Time. #348305
2006-09-13 16:32:33 +00:00
|
|
|
guint32 net_wm_user_time;
|
2007-03-31 05:19:41 +00:00
|
|
|
|
|
|
|
/* window that gets updated net_wm_user_time values */
|
|
|
|
Window user_time_window;
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2014-05-21 17:22:59 +00:00
|
|
|
gboolean has_custom_frame_extents;
|
|
|
|
GtkBorder custom_frame_extents;
|
|
|
|
|
2014-05-20 21:47:10 +00:00
|
|
|
/* The rectangles here are in "frame rect" coordinates. See the
|
|
|
|
* comment at the top of meta_window_move_resize_internal() for more
|
|
|
|
* information. */
|
|
|
|
|
|
|
|
/* The current window geometry of the window. */
|
2001-06-02 04:14:18 +00:00
|
|
|
MetaRectangle rect;
|
2001-06-07 05:18:10 +00:00
|
|
|
|
2016-01-10 14:16:09 +00:00
|
|
|
/* The geometry to restore when we unmaximize. */
|
|
|
|
MetaRectangle saved_rect;
|
|
|
|
|
window: Replace the user_rect with the unconstrained_rect
Realistically, the user rect contains the unconstrained window
rectangle coordinates that we want to be displaying, in case
something in the constraints change.
Rename it to the "unconstrained_rect", and change the code to always
save it, regardless of current state.
When metacity was originally being built, the purpose of the user
rect was a lot less clear. The code only saved it on user actions,
with various other calls to save_user_window_placement() and a force
mechanism sprinkled in to avoid windows being snapped back to odd
places when constraints changed.
This could lead to odd bugs. For instance, if the user uses some
extension which automatically tiles windows and didn't pass
user_action=TRUE, and then the struts changed, the window would be
placed back at the last place a user moved it to, rather than where
the window was tiled to.
The META_IS_USER_ACTION flag is still used in the constraints code
to determine whether we should allow shoving windows offscreen, so
we can't remove it completely, but we should think about splitting
out the constrainment policies it commands for a bit more
fine-grained control.
https://bugzilla.gnome.org/show_bug.cgi?id=726714
2014-03-18 14:53:00 +00:00
|
|
|
/* This is the geometry the window will have if no constraints have
|
|
|
|
* applied. We use this whenever we are moving implicitly (for example,
|
|
|
|
* if we move to avoid a panel, we can snap back to this position if
|
2014-05-20 21:47:10 +00:00
|
|
|
* the panel moves again).
|
2001-08-29 03:37:03 +00:00
|
|
|
*/
|
window: Replace the user_rect with the unconstrained_rect
Realistically, the user rect contains the unconstrained window
rectangle coordinates that we want to be displaying, in case
something in the constraints change.
Rename it to the "unconstrained_rect", and change the code to always
save it, regardless of current state.
When metacity was originally being built, the purpose of the user
rect was a lot less clear. The code only saved it on user actions,
with various other calls to save_user_window_placement() and a force
mechanism sprinkled in to avoid windows being snapped back to odd
places when constraints changed.
This could lead to odd bugs. For instance, if the user uses some
extension which automatically tiles windows and didn't pass
user_action=TRUE, and then the struts changed, the window would be
placed back at the last place a user moved it to, rather than where
the window was tiled to.
The META_IS_USER_ACTION flag is still used in the constraints code
to determine whether we should allow shoving windows offscreen, so
we can't remove it completely, but we should think about splitting
out the constrainment policies it commands for a bit more
fine-grained control.
https://bugzilla.gnome.org/show_bug.cgi?id=726714
2014-03-18 14:53:00 +00:00
|
|
|
MetaRectangle unconstrained_rect;
|
2014-05-20 21:47:10 +00:00
|
|
|
|
2014-06-17 15:03:29 +00:00
|
|
|
/* The rectangle of the "server-side" geometry of the buffer,
|
|
|
|
* in root coordinates.
|
|
|
|
*
|
|
|
|
* For X11 windows, this matches XGetGeometry of the toplevel.
|
|
|
|
*
|
2016-03-04 08:14:33 +00:00
|
|
|
* For Wayland windows, the position matches the position of the
|
|
|
|
* surface associated with shell surface (wl_shell_surface, xdg_surface
|
|
|
|
* etc). The size matches the size surface size as displayed in the stage.
|
|
|
|
*/
|
2014-06-17 15:03:29 +00:00
|
|
|
MetaRectangle buffer_rect;
|
|
|
|
|
2013-02-01 10:32:53 +00:00
|
|
|
/* Cached net_wm_icon_geometry */
|
|
|
|
MetaRectangle icon_geometry;
|
|
|
|
|
2001-06-02 04:14:18 +00:00
|
|
|
/* x/y/w/h here get filled with ConfigureRequest values */
|
|
|
|
XSizeHints size_hints;
|
2001-06-10 07:27:11 +00:00
|
|
|
|
|
|
|
/* Managed by stack.c */
|
|
|
|
MetaStackLayer layer;
|
2002-09-28 16:33:39 +00:00
|
|
|
int stack_position; /* see comment in stack.h */
|
2014-05-02 13:34:02 +00:00
|
|
|
|
2014-05-20 18:48:08 +00:00
|
|
|
/* Managed by delete.c */
|
2016-07-11 11:19:25 +00:00
|
|
|
MetaCloseDialog *close_dialog;
|
2002-08-12 21:32:13 +00:00
|
|
|
|
|
|
|
/* maintained by group.c */
|
2003-06-04 19:15:46 +00:00
|
|
|
MetaGroup *group;
|
2008-10-31 09:10:10 +00:00
|
|
|
|
2009-02-02 20:16:05 +00:00
|
|
|
GObject *compositor_private;
|
2011-03-25 01:36:47 +00:00
|
|
|
|
|
|
|
/* Focused window that is (directly or indirectly) attached to this one */
|
|
|
|
MetaWindow *attached_focus_window;
|
2012-02-24 16:08:55 +00:00
|
|
|
|
2016-01-10 14:16:09 +00:00
|
|
|
/* The currently complementary tiled window, if any */
|
|
|
|
MetaWindow *tile_match;
|
|
|
|
|
2012-08-30 06:40:18 +00:00
|
|
|
/* Bypass compositor hints */
|
2013-02-02 19:05:43 +00:00
|
|
|
guint bypass_compositor;
|
2016-02-01 10:46:11 +00:00
|
|
|
|
|
|
|
MetaPlacementRule *placement_rule;
|
2018-10-19 11:33:13 +00:00
|
|
|
MetaPlacementState placement_state;
|
2018-10-05 12:42:24 +00:00
|
|
|
int constrained_placement_rule_offset_x;
|
|
|
|
int constrained_placement_rule_offset_y;
|
2018-10-18 14:24:18 +00:00
|
|
|
|
|
|
|
guint unmanage_idle_id;
|
2001-05-30 15:36:31 +00:00
|
|
|
};
|
|
|
|
|
2008-11-07 09:57:00 +00:00
|
|
|
struct _MetaWindowClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2014-03-18 15:20:22 +00:00
|
|
|
|
2014-03-19 13:36:15 +00:00
|
|
|
void (*manage) (MetaWindow *window);
|
|
|
|
void (*unmanage) (MetaWindow *window);
|
2014-03-20 19:12:44 +00:00
|
|
|
void (*ping) (MetaWindow *window,
|
|
|
|
guint32 serial);
|
2014-03-20 19:07:44 +00:00
|
|
|
void (*delete) (MetaWindow *window,
|
|
|
|
guint32 timestamp);
|
|
|
|
void (*kill) (MetaWindow *window);
|
2014-03-20 19:16:57 +00:00
|
|
|
void (*focus) (MetaWindow *window,
|
|
|
|
guint32 timestamp);
|
2014-04-29 19:55:55 +00:00
|
|
|
void (*grab_op_began) (MetaWindow *window,
|
|
|
|
MetaGrabOp op);
|
|
|
|
void (*grab_op_ended) (MetaWindow *window,
|
|
|
|
MetaGrabOp op);
|
2014-05-20 19:46:21 +00:00
|
|
|
void (*current_workspace_changed) (MetaWindow *window);
|
2014-03-19 14:30:12 +00:00
|
|
|
void (*move_resize_internal) (MetaWindow *window,
|
|
|
|
int gravity,
|
2014-05-21 17:59:13 +00:00
|
|
|
MetaRectangle unconstrained_rect,
|
2014-03-19 14:30:12 +00:00
|
|
|
MetaRectangle constrained_rect,
|
|
|
|
MetaMoveResizeFlags flags,
|
|
|
|
MetaMoveResizeResultFlags *result);
|
2014-04-28 21:06:38 +00:00
|
|
|
gboolean (*update_struts) (MetaWindow *window);
|
2014-03-18 15:20:22 +00:00
|
|
|
void (*get_default_skip_hints) (MetaWindow *window,
|
|
|
|
gboolean *skip_taskbar_out,
|
|
|
|
gboolean *skip_pager_out);
|
2015-01-01 04:39:36 +00:00
|
|
|
gboolean (*update_icon) (MetaWindow *window,
|
|
|
|
cairo_surface_t **icon,
|
|
|
|
cairo_surface_t **mini_icon);
|
2016-10-07 15:55:32 +00:00
|
|
|
uint32_t (*get_client_pid) (MetaWindow *window);
|
2018-08-24 10:54:50 +00:00
|
|
|
void (*update_main_monitor) (MetaWindow *window,
|
|
|
|
MetaWindowUpdateMonitorFlags flags);
|
2015-03-03 03:13:05 +00:00
|
|
|
void (*main_monitor_changed) (MetaWindow *window,
|
2016-11-25 06:31:38 +00:00
|
|
|
const MetaLogicalMonitor *old);
|
2019-08-22 08:55:17 +00:00
|
|
|
void (*adjust_fullscreen_monitor_rect) (MetaWindow *window,
|
|
|
|
MetaRectangle *monitor_rect);
|
2017-03-17 12:34:52 +00:00
|
|
|
void (*force_restore_shortcuts) (MetaWindow *window,
|
|
|
|
ClutterInputDevice *source);
|
|
|
|
gboolean (*shortcuts_inhibited) (MetaWindow *window,
|
|
|
|
ClutterInputDevice *source);
|
2018-11-13 07:56:53 +00:00
|
|
|
gboolean (*is_focusable) (MetaWindow *window);
|
2018-01-09 12:19:40 +00:00
|
|
|
gboolean (*is_stackable) (MetaWindow *window);
|
2019-01-30 19:41:11 +00:00
|
|
|
gboolean (*can_ping) (MetaWindow *window);
|
2018-09-14 17:03:38 +00:00
|
|
|
gboolean (*are_updates_frozen) (MetaWindow *window);
|
2018-12-30 12:55:52 +00:00
|
|
|
|
|
|
|
void (* map) (MetaWindow *window);
|
|
|
|
void (* unmap) (MetaWindow *window);
|
2008-11-07 09:57:00 +00:00
|
|
|
};
|
|
|
|
|
2003-06-12 05:55:06 +00:00
|
|
|
/* These differ from window->has_foo_func in that they consider
|
|
|
|
* the dynamic window state such as "maximized", not just the
|
|
|
|
* window's type
|
|
|
|
*/
|
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 14:58:50 +00:00
|
|
|
#define META_WINDOW_MAXIMIZED(w) ((w)->maximized_horizontally && \
|
|
|
|
(w)->maximized_vertically)
|
2008-03-03 01:58:54 +00:00
|
|
|
#define META_WINDOW_MAXIMIZED_VERTICALLY(w) ((w)->maximized_vertically)
|
|
|
|
#define META_WINDOW_MAXIMIZED_HORIZONTALLY(w) ((w)->maximized_horizontally)
|
2016-01-10 14:16:09 +00:00
|
|
|
#define META_WINDOW_TILED_SIDE_BY_SIDE(w) ((w)->maximized_vertically && \
|
|
|
|
!(w)->maximized_horizontally && \
|
|
|
|
(w)->tile_mode != META_TILE_NONE)
|
|
|
|
#define META_WINDOW_TILED_LEFT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
|
|
|
(w)->tile_mode == META_TILE_LEFT)
|
|
|
|
#define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
|
|
|
(w)->tile_mode == META_TILE_RIGHT)
|
|
|
|
#define META_WINDOW_TILED_MAXIMIZED(w)(META_WINDOW_MAXIMIZED(w) && \
|
|
|
|
(w)->tile_mode == META_TILE_MAXIMIZED)
|
2003-06-12 05:55:06 +00:00
|
|
|
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
|
2017-09-27 12:37:57 +00:00
|
|
|
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
|
2002-07-03 02:32:40 +00:00
|
|
|
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
|
|
|
|
(((w)->size_hints.min_width < (w)->size_hints.max_width) || \
|
|
|
|
((w)->size_hints.min_height < (w)->size_hints.max_height)))
|
|
|
|
#define META_WINDOW_ALLOWS_HORIZONTAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_width < (w)->size_hints.max_width)
|
|
|
|
#define META_WINDOW_ALLOWS_VERTICAL_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && (w)->size_hints.min_height < (w)->size_hints.max_height)
|
|
|
|
|
2014-02-02 00:19:22 +00:00
|
|
|
MetaWindow * _meta_window_shared_new (MetaDisplay *display,
|
|
|
|
MetaWindowClientType client_type,
|
|
|
|
MetaWaylandSurface *surface,
|
|
|
|
Window xwindow,
|
|
|
|
gulong existing_wm_state,
|
|
|
|
MetaCompEffect effect,
|
|
|
|
XWindowAttributes *attrs);
|
|
|
|
|
2008-11-07 09:57:00 +00:00
|
|
|
void meta_window_unmanage (MetaWindow *window,
|
Partial audit to fix timestamp usage. One step towards fixing #355180; see
2006-09-18 Elijah Newren <newren gmail com>
Partial audit to fix timestamp usage. One step towards fixing
#355180; see important comments in that bug.
* src/core.[ch] (meta_core_unshade, meta_core_shade):
* src/delete.c (meta_window_present_delete_dialog,
delete_ping_timeout_func):
* src/display.[ch] (meta_display_open, meta_display_close,
event_callback, meta_display_begin_grab_op,
process_selection_clear, meta_display_unmanage_screen,
meta_display_unmanage_windows_for_screen):
* src/frames.c (meta_frames_button_press_event):
* src/keybindings.c (handle_toggle_shade):
* src/main.c (main):
* src/screen.[ch] (update_num_workspaces, meta_screen_new,
meta_screen_free, prefs_changed_callback):
* src/window.[ch] (meta_window_free, finish_minimize,
implement_showing, meta_window_show, meta_window_maximize,
meta_window_make_fullscreen_internal,
meta_window_unmake_fullscreen, meta_window_shade,
meta_window_unshade, window_activate, send_sync_request,
meta_window_client_message, menu_callback,
meta_window_update_keyboard_resize):
Remove usage of CurrentTime, meta_display_get_current_time() and
meta_display_get_current_time_roundtrip() where possible, or
document why it isn't possible, or at very least add a FIXME with
some explanation of my laziness and what needs to be done.
2006-09-18 17:27:24 +00:00
|
|
|
guint32 timestamp);
|
2018-10-18 14:24:18 +00:00
|
|
|
void meta_window_unmanage_on_idle (MetaWindow *window);
|
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-11 01:15:33 +00:00
|
|
|
void meta_window_queue (MetaWindow *window,
|
|
|
|
guint queuebits);
|
2017-09-27 13:11:54 +00:00
|
|
|
void meta_window_tile (MetaWindow *window,
|
|
|
|
MetaTileMode mode);
|
2019-06-13 13:49:26 +00:00
|
|
|
MetaTileMode meta_window_get_tile_mode (MetaWindow *window);
|
2017-09-27 12:37:57 +00:00
|
|
|
void meta_window_restore_tile (MetaWindow *window,
|
|
|
|
MetaTileMode mode,
|
|
|
|
int width,
|
|
|
|
int height);
|
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 14:58:50 +00:00
|
|
|
void meta_window_maximize_internal (MetaWindow *window,
|
|
|
|
MetaMaximizeFlags directions,
|
|
|
|
MetaRectangle *saved_rect);
|
2001-06-06 04:47:37 +00:00
|
|
|
|
Fix several bugs with handling of fullscreen windows, causing them to not
2006-08-21 Elijah Newren <newren gmail com>
Fix several bugs with handling of fullscreen windows, causing them
to not actually be fullscreen. #343115 (and also #346927,
#350547, #351643, the recent additional WINE-related issue
mentioned on the mailing list, and probably others...)
* src/constraints.c (setup_constraint_info): if a window tries to
resize to fullscreen-size and it has a fullscreen function but
isn't actually marked as fullscreen then assist it by marking it
as such, (constrain_fully_onscreen, constrain_titlebar_visible):
ignore this constraint for fullscreen windows since such windows
have a separate specialized constraint
* src/stack.c (window_is_fullscreen_size, get_standalone_layer):
remove the old window_is_fullscreen_size() hack for detecting
windows to treat as fullscreen since it doesn't work well with the
new constraints framework (i.e. we needed a slightly different
hack)
* src/window.[ch] (meta_window_new_with_addrs): shuffle the order
of adding the window to the stack and moveresizing the window
since moveresizing can cause stack changes if the window's initial
size is fullscreen size, (meta_window_make_fullscreen,
meta_window_make_fullscreen_internal): split
meta_window_make_fullscreen() similar to meta_window_maximize() so
that constraints can make use of it
2006-08-21 18:08:05 +00:00
|
|
|
void meta_window_make_fullscreen_internal (MetaWindow *window);
|
2016-11-29 09:50:17 +00:00
|
|
|
void meta_window_update_fullscreen_monitors (MetaWindow *window,
|
|
|
|
MetaLogicalMonitor *top,
|
|
|
|
MetaLogicalMonitor *bottom,
|
|
|
|
MetaLogicalMonitor *left,
|
|
|
|
MetaLogicalMonitor *right);
|
|
|
|
|
|
|
|
gboolean meta_window_has_fullscreen_monitors (MetaWindow *window);
|
2001-10-29 07:00:46 +00:00
|
|
|
|
2019-08-22 08:55:17 +00:00
|
|
|
void meta_window_adjust_fullscreen_monitor_rect (MetaWindow *window,
|
|
|
|
MetaRectangle *monitor_rect);
|
|
|
|
|
2014-05-20 22:28:56 +00:00
|
|
|
void meta_window_resize_frame_with_gravity (MetaWindow *window,
|
|
|
|
gboolean user_op,
|
|
|
|
int w,
|
|
|
|
int h,
|
|
|
|
int gravity);
|
|
|
|
|
2004-12-20 02:53:08 +00:00
|
|
|
/* Return whether the window should be currently mapped */
|
|
|
|
gboolean meta_window_should_be_showing (MetaWindow *window);
|
2006-01-10 18:33:53 +00:00
|
|
|
|
2003-06-26 03:09:38 +00:00
|
|
|
void meta_window_update_struts (MetaWindow *window);
|
|
|
|
|
2001-07-07 18:43:19 +00:00
|
|
|
/* gets position we need to set to stay in current position,
|
|
|
|
* assuming position will be gravity-compensated. i.e.
|
|
|
|
* this is the position a client would send in a configure
|
|
|
|
* request.
|
|
|
|
*/
|
|
|
|
void meta_window_get_gravity_position (MetaWindow *window,
|
2007-04-09 23:00:55 +00:00
|
|
|
int gravity,
|
2001-07-07 18:43:19 +00:00
|
|
|
int *x,
|
|
|
|
int *y);
|
2001-07-28 06:35:19 +00:00
|
|
|
/* Get geometry for saving in the session; x/y are gravity
|
|
|
|
* position, and w/h are in resize inc above the base size.
|
|
|
|
*/
|
2014-05-21 17:49:24 +00:00
|
|
|
void meta_window_get_session_geometry (MetaWindow *window,
|
2001-07-28 06:35:19 +00:00
|
|
|
int *x,
|
|
|
|
int *y,
|
|
|
|
int *width,
|
|
|
|
int *height);
|
2005-05-26 19:58:17 +00:00
|
|
|
|
2001-12-10 07:48:21 +00:00
|
|
|
void meta_window_update_unfocused_button_grabs (MetaWindow *window);
|
2001-06-04 04:58:22 +00:00
|
|
|
|
2011-04-26 12:12:04 +00:00
|
|
|
void meta_window_set_focused_internal (MetaWindow *window,
|
|
|
|
gboolean focused);
|
2001-06-10 03:17:15 +00:00
|
|
|
|
2018-11-13 07:56:53 +00:00
|
|
|
gboolean meta_window_is_focusable (MetaWindow *window);
|
|
|
|
|
2019-01-30 19:41:11 +00:00
|
|
|
gboolean meta_window_can_ping (MetaWindow *window);
|
|
|
|
|
2014-05-20 19:46:21 +00:00
|
|
|
void meta_window_current_workspace_changed (MetaWindow *window);
|
2001-06-23 05:49:35 +00:00
|
|
|
|
2014-05-23 21:14:51 +00:00
|
|
|
void meta_window_show_menu (MetaWindow *window,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
int x,
|
|
|
|
int y);
|
2001-06-23 05:49:35 +00:00
|
|
|
|
2014-05-30 22:52:06 +00:00
|
|
|
void meta_window_show_menu_for_rect (MetaWindow *window,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
MetaRectangle *rect);
|
|
|
|
|
2014-04-21 15:21:19 +00:00
|
|
|
gboolean meta_window_handle_mouse_grab_op_event (MetaWindow *window,
|
|
|
|
const ClutterEvent *event);
|
2001-07-26 03:14:45 +00:00
|
|
|
|
2003-06-26 03:09:38 +00:00
|
|
|
GList* meta_window_get_workspaces (MetaWindow *window);
|
|
|
|
|
2016-11-29 03:48:52 +00:00
|
|
|
void meta_window_get_work_area_for_logical_monitor (MetaWindow *window,
|
|
|
|
MetaLogicalMonitor *logical_monitor,
|
|
|
|
MetaRectangle *area);
|
|
|
|
|
2016-01-10 14:16:09 +00:00
|
|
|
int meta_window_get_current_tile_monitor_number (MetaWindow *window);
|
2017-09-27 12:53:54 +00:00
|
|
|
void meta_window_get_tile_area (MetaWindow *window,
|
|
|
|
MetaTileMode mode,
|
|
|
|
MetaRectangle *tile_area);
|
2016-01-10 14:16:09 +00:00
|
|
|
|
|
|
|
|
2002-01-27 05:50:34 +00:00
|
|
|
gboolean meta_window_same_application (MetaWindow *window,
|
|
|
|
MetaWindow *other_window);
|
|
|
|
|
2002-12-06 05:07:01 +00:00
|
|
|
#define META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE(w) \
|
2002-03-12 04:34:17 +00:00
|
|
|
((w)->type != META_WINDOW_DOCK && (w)->type != META_WINDOW_DESKTOP)
|
2002-12-06 05:07:01 +00:00
|
|
|
#define META_WINDOW_IN_NORMAL_TAB_CHAIN(w) \
|
2019-01-30 19:19:41 +00:00
|
|
|
(meta_window_is_focusable (w) && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) && (!(w)->skip_taskbar))
|
2002-04-05 15:52:49 +00:00
|
|
|
#define META_WINDOW_IN_DOCK_TAB_CHAIN(w) \
|
2019-01-30 19:19:41 +00:00
|
|
|
(meta_window_is_focusable (w) && (! META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w) || (w)->skip_taskbar))
|
2006-04-15 02:05:44 +00:00
|
|
|
#define META_WINDOW_IN_GROUP_TAB_CHAIN(w, g) \
|
2019-01-30 19:19:41 +00:00
|
|
|
(meta_window_is_focusable (w) && (!g || meta_window_get_group(w)==g))
|
2002-04-05 15:52:49 +00:00
|
|
|
|
2002-04-13 04:58:45 +00:00
|
|
|
void meta_window_free_delete_dialog (MetaWindow *window);
|
|
|
|
|
2003-10-12 06:25:38 +00:00
|
|
|
void meta_window_update_keyboard_resize (MetaWindow *window,
|
|
|
|
gboolean update_cursor);
|
|
|
|
void meta_window_update_keyboard_move (MetaWindow *window);
|
Patch to provide extra cues to the user when using window menu move and
2002-08-08 Craig Black <blackc@speakeasy.net>
Patch to provide extra cues to the user when using
window menu move and resize, #85724.
* src/common.h: add new cursors
* src/display.c: (grab_op_is_mouse)
(meta_display_create_x_cursor), (xcursor_for_op),
(meta_display_set_grab_op_cursor),
(meta_display_begin_grab_op):
The keyboard move and resize grab ops now also use the mouse.
Allow the grab cursor to be changed during the grab op.
Hold onto the initial grab position in case of reset.
* src/display.h: save the initial grab position
* src/keybindings.c: (process_keyboard_move_grab),
(process_keyboard_resize_grab), (handle_begin_move),
(handle_begin_resize):
The keyboard move and resize grab ops now also use the mouse.
* src/window.c: (meta_window_client_message), (menu_callback),
(update_move), (update_resize),
(meta_window_handle_mouse_grab_op_event), (warp_pointer),
(meta_window_warp_pointer), (meta_window_begin_grab_op),
(meta_window_update_resize_grab_op):
When moving or resizing a window use the last grab position
in computing change increment.
Provide support for warping the mouse pointer.
* src/window.h: new warp pointer and grab op helper functions
2002-08-09 04:27:23 +00:00
|
|
|
|
2002-09-24 21:22:06 +00:00
|
|
|
void meta_window_update_layer (MetaWindow *window);
|
|
|
|
|
deleted and moved into window-props.c (meta_window_new_with_attrs): added
2006-03-25 Thomas Thurman <thomas@thurman.org.uk>
* src/window.c, src/window.h (update_net_wm_state,
update_mwm_hints, update_wm_class, update_transient_for):
deleted and moved into window-props.c
(meta_window_new_with_attrs): added constructing field
and four new initial properties (as above)
(meta_window_recalc_features,
meta_window_recalc_window_type): new functions
* src/window-props.c (init_net_wm_state, reload_net_wm_state
init_mwm_hints, reload_mwm_hints, init_wm_class,
reload_mwm_class, init_transient_for, reload_transient_for):
new functions, moved in from window.c
(meta_display_init_window_prop_hooks): initialise new properties
2006-03-25 22:57:22 +00:00
|
|
|
void meta_window_recalc_features (MetaWindow *window);
|
2008-11-19 12:30:45 +00:00
|
|
|
|
2014-03-13 20:52:31 +00:00
|
|
|
void meta_window_set_type (MetaWindow *window,
|
|
|
|
MetaWindowType type);
|
2003-02-28 01:24:44 +00:00
|
|
|
|
2013-11-15 22:37:50 +00:00
|
|
|
void meta_window_frame_size_changed (MetaWindow *window);
|
|
|
|
|
2018-01-09 12:19:40 +00:00
|
|
|
gboolean meta_window_is_in_stack (MetaWindow *window);
|
|
|
|
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
void meta_window_stack_just_below (MetaWindow *window,
|
|
|
|
MetaWindow *below_this_one);
|
2003-02-28 01:24:44 +00:00
|
|
|
|
2017-09-29 14:57:22 +00:00
|
|
|
void meta_window_stack_just_above (MetaWindow *window,
|
|
|
|
MetaWindow *above_this_one);
|
|
|
|
|
Big patch to cover about 6 different issues in order to correct rare
2005-02-20 Elijah Newren <newren@gmail.com>
Big patch to cover about 6 different issues in order to correct
rare problems with timestamps (make sure window selected in
tasklist actually gets focus, sanity check timestamps to avoid
rogue apps hosing the system, correct the updating of
net_wm_user_time, correctly handle timestamps of 0 when comparing
xserver timestamps for those who have had their systems up for
over 25 days or so, add some debugging information to verbose
logs, some code cleanups). Fixes all issues listed in #167358.
* src/display.h: (struct _MetaDisplay): clarify comment on
last_focus_time, introduce a new variable--last_user_time,
(XSERVER_TIME_IS_BEFORE macro): put this functionality into a
separate macro and then introduce a new macro with this name that
uses the old one but adds additional special-case checks for
timestamps that are 0, (comment to
meta_display_set_input_focus_window): add information about how
last_user_time should be used in this function
* src/display.c (santiy_check_timestamps): new function,
(meta_display_open): intialize display->last_user_time,
(meta_display_get_current_time_roundtrip): use the timestamp,
which is known to be good, in order to sanity_check_timestamps,
(event_callback): use the new meta_window_ste_user_time() function
in order to correct problems, use the timestamp of KeyPress and
ButtonPress events, which are known to be good, in order to
sanity_check_timestamps, (timestamp_too_old): new function for
common behavior of meta_display_focus_the_no_focus_window and
meta_display_set_input_focus_window, with added checking for
display->last_user_time in addition to display->last_focus_time,
(meta_display_set_input_focus_window): replace some of the code
with a call to timestamp_too_old(),
(meta_display_focus_the_no_focus_window): replace some of th ecode
with a call to timestamp_too_old()
* src/window.h: (meta_window_set_user_time): new function to
abstract the many things that need to be done when updating the
net_wm_user_time of any window
* src/window.c: (meta_window_activate): add debugging spew, make
sure the comparison is made with last_user_time NOT
last_focus_time, use meta_window_set_user_time() function in order
to correct problems, (meta_window_client_message): add a newline
to a debugging message to make them easier to read,
(meta_window_set_user_time): new function
* src/window-props.c (reload_net_wm_user_time): use the new
meta_window_ste_user_time() function in order to correct problems
2005-02-20 17:14:16 +00:00
|
|
|
void meta_window_set_user_time (MetaWindow *window,
|
Fix issues on 64-bit machines with timestamps by using guint32 (like gtk+
2006-09-13 Elijah Newren <newren gmail com>
* src/common.h (MetaWindowMenuFunc):
* src/core.[ch] (meta_core_user_lower_and_unfocus,
meta_core_user_focus, meta_core_show_window_menu,
meta_core_begin_grab_op, meta_core_end_grab_op):
* src/delete.c (delete_ping_reply_func, delete_ping_timeout_func,
meta_window_delete):
* src/display.[ch] (struct MetaDisplay, struct MetaPingData,
sanity_check_timestamps, meta_display_open, event_callback,
meta_spew_event, meta_display_set_grab_op_cursor,
meta_display_begin_grab_op, meta_display_end_grab_op,
meta_display_ping_timeout, meta_display_ping_window,
process_pong_message, timestamp_too_old,
meta_display_set_input_focus_window):
* src/keybindings.[ch] (grab_keyboard, ungrab_keyboard,
meta_screen_grab_all_keys, meta_window_grab_all_keys,
meta_window_ungrab_all_keys, error_on_generic_command,
error_on_command, error_on_terminal_command):
* src/metacity-dialog.c (on_realize, warn_about_no_sm_support,
error_about_command, main):
* src/screen.[ch] (struct _MetaScreen, meta_screen_new,
meta_screen_show_desktop, meta_screen_apply_startup_properties):
* src/session.c (warn_about_lame_clients_and_finish_interact):
* src/window.[ch] (struct _MetaWindow,
intervening_user_event_occurred, window_activate,
meta_window_delete, meta_window_focus,
meta_window_send_icccm_message, meta_window_client_message,
menu_callback, meta_window_show_menu, struct EventScannerData,
check_use_this_motion_notify, meta_window_begin_grab_op,
meta_window_set_user_time):
* src/workspace.[ch] (focus_ancestor_or_mru_window,
meta_workspace_activate_with_focus, meta_workspace_activate,
meta_workspace_focus_default_window,
focus_ancestor_or_mru_window):
Fix issues on 64-bit machines with timestamps by using guint32
(like gtk+ does) instead of Time. #348305
2006-09-13 16:32:33 +00:00
|
|
|
guint32 timestamp);
|
Big patch to cover about 6 different issues in order to correct rare
2005-02-20 Elijah Newren <newren@gmail.com>
Big patch to cover about 6 different issues in order to correct
rare problems with timestamps (make sure window selected in
tasklist actually gets focus, sanity check timestamps to avoid
rogue apps hosing the system, correct the updating of
net_wm_user_time, correctly handle timestamps of 0 when comparing
xserver timestamps for those who have had their systems up for
over 25 days or so, add some debugging information to verbose
logs, some code cleanups). Fixes all issues listed in #167358.
* src/display.h: (struct _MetaDisplay): clarify comment on
last_focus_time, introduce a new variable--last_user_time,
(XSERVER_TIME_IS_BEFORE macro): put this functionality into a
separate macro and then introduce a new macro with this name that
uses the old one but adds additional special-case checks for
timestamps that are 0, (comment to
meta_display_set_input_focus_window): add information about how
last_user_time should be used in this function
* src/display.c (santiy_check_timestamps): new function,
(meta_display_open): intialize display->last_user_time,
(meta_display_get_current_time_roundtrip): use the timestamp,
which is known to be good, in order to sanity_check_timestamps,
(event_callback): use the new meta_window_ste_user_time() function
in order to correct problems, use the timestamp of KeyPress and
ButtonPress events, which are known to be good, in order to
sanity_check_timestamps, (timestamp_too_old): new function for
common behavior of meta_display_focus_the_no_focus_window and
meta_display_set_input_focus_window, with added checking for
display->last_user_time in addition to display->last_focus_time,
(meta_display_set_input_focus_window): replace some of the code
with a call to timestamp_too_old(),
(meta_display_focus_the_no_focus_window): replace some of th ecode
with a call to timestamp_too_old()
* src/window.h: (meta_window_set_user_time): new function to
abstract the many things that need to be done when updating the
net_wm_user_time of any window
* src/window.c: (meta_window_activate): add debugging spew, make
sure the comparison is made with last_user_time NOT
last_focus_time, use meta_window_set_user_time() function in order
to correct problems, (meta_window_client_message): add a newline
to a debugging message to make them easier to read,
(meta_window_set_user_time): new function
* src/window-props.c (reload_net_wm_user_time): use the new
meta_window_ste_user_time() function in order to correct problems
2005-02-20 17:14:16 +00:00
|
|
|
|
2011-05-20 08:56:12 +00:00
|
|
|
void meta_window_update_for_monitors_changed (MetaWindow *window);
|
2014-08-16 17:22:05 +00:00
|
|
|
void meta_window_on_all_workspaces_changed (MetaWindow *window);
|
2009-01-27 05:03:06 +00:00
|
|
|
|
window: make determination of attached dialog windows more consistent
Different bits of code were using slightly different checks to test
whether a window was an attached dialog. Add a new
meta_window_is_attached_dialog(), and use that everywhere.
Also, freeze the is-attached status when the window is first shown,
rather than recomputing it each time the caller asks, since this could
cause problems if a window changes its type after it has already been
attached, etc. However, if an attached window's parent is destroyed,
or an attached window changes its transient-for, then fix things up by
destroying the old MetaWindow and creating a new one (causing
compositor unmap and map events to be fired off, allowing the display
of the window to be fixed up).
Remove some code in display.c that tried to fix existing windows if
the gconf setting changed, but which didn't actually do anything (at
least under gnome-shell). However, if 654643 was fixed then the new
behavior with this patch would be that changing the gconf setting
would affect new dialogs, but not existing ones.
https://bugzilla.gnome.org/show_bug.cgi?id=646761
2011-04-05 14:14:52 +00:00
|
|
|
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
|
2016-01-10 14:16:08 +00:00
|
|
|
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
|
2016-01-10 14:16:09 +00:00
|
|
|
|
|
|
|
void meta_window_compute_tile_match (MetaWindow *window);
|
2012-02-24 16:08:55 +00:00
|
|
|
|
2011-06-13 21:53:23 +00:00
|
|
|
gboolean meta_window_updates_are_frozen (MetaWindow *window);
|
|
|
|
|
2013-08-30 07:40:36 +00:00
|
|
|
void meta_window_set_title (MetaWindow *window,
|
|
|
|
const char *title);
|
|
|
|
void meta_window_set_wm_class (MetaWindow *window,
|
|
|
|
const char *wm_class,
|
|
|
|
const char *wm_instance);
|
|
|
|
void meta_window_set_gtk_dbus_properties (MetaWindow *window,
|
|
|
|
const char *application_id,
|
|
|
|
const char *unique_bus_name,
|
|
|
|
const char *appmenu_path,
|
|
|
|
const char *menubar_path,
|
|
|
|
const char *application_object_path,
|
|
|
|
const char *window_object_path);
|
|
|
|
|
2013-09-16 12:44:37 +00:00
|
|
|
void meta_window_set_transient_for (MetaWindow *window,
|
|
|
|
MetaWindow *parent);
|
|
|
|
|
2013-12-06 18:44:31 +00:00
|
|
|
void meta_window_set_opacity (MetaWindow *window,
|
2014-04-10 06:41:22 +00:00
|
|
|
guint8 opacity);
|
2013-12-06 18:44:31 +00:00
|
|
|
|
2013-10-16 04:06:10 +00:00
|
|
|
void meta_window_handle_enter (MetaWindow *window,
|
|
|
|
guint32 timestamp,
|
|
|
|
guint root_x,
|
|
|
|
guint root_y);
|
2014-05-15 20:20:41 +00:00
|
|
|
void meta_window_handle_leave (MetaWindow *window);
|
2013-10-16 04:06:10 +00:00
|
|
|
|
2019-07-25 06:57:05 +00:00
|
|
|
gboolean meta_window_handle_ui_frame_event (MetaWindow *window,
|
|
|
|
const ClutterEvent *event);
|
|
|
|
|
2014-08-15 12:29:16 +00:00
|
|
|
void meta_window_handle_ungrabbed_event (MetaWindow *window,
|
|
|
|
const ClutterEvent *event);
|
2014-05-08 19:12:58 +00:00
|
|
|
|
2016-10-07 15:55:32 +00:00
|
|
|
uint32_t meta_window_get_client_pid (MetaWindow *window);
|
|
|
|
|
2014-02-27 00:33:43 +00:00
|
|
|
void meta_window_get_client_area_rect (const MetaWindow *window,
|
|
|
|
cairo_rectangle_int_t *rect);
|
2014-05-22 20:48:58 +00:00
|
|
|
void meta_window_get_titlebar_rect (MetaWindow *window,
|
|
|
|
MetaRectangle *titlebar_rect);
|
2014-02-27 00:33:43 +00:00
|
|
|
|
2014-01-23 21:33:53 +00:00
|
|
|
void meta_window_activate_full (MetaWindow *window,
|
|
|
|
guint32 timestamp,
|
|
|
|
MetaClientType source_indication,
|
|
|
|
MetaWorkspace *workspace);
|
|
|
|
|
2016-12-01 04:59:47 +00:00
|
|
|
MetaLogicalMonitor * meta_window_calculate_main_logical_monitor (MetaWindow *window);
|
|
|
|
|
2016-12-02 07:38:08 +00:00
|
|
|
MetaLogicalMonitor * meta_window_get_main_logical_monitor (MetaWindow *window);
|
2018-08-24 10:54:50 +00:00
|
|
|
void meta_window_update_monitor (MetaWindow *window,
|
|
|
|
MetaWindowUpdateMonitorFlags flags);
|
2014-03-18 14:36:00 +00:00
|
|
|
|
2014-03-18 17:51:36 +00:00
|
|
|
void meta_window_set_urgent (MetaWindow *window,
|
|
|
|
gboolean urgent);
|
|
|
|
|
2014-03-19 14:30:12 +00:00
|
|
|
void meta_window_update_resize (MetaWindow *window,
|
|
|
|
gboolean snap,
|
|
|
|
int x, int y,
|
|
|
|
gboolean force);
|
|
|
|
|
2014-04-28 21:44:45 +00:00
|
|
|
void meta_window_move_resize_internal (MetaWindow *window,
|
|
|
|
MetaMoveResizeFlags flags,
|
|
|
|
int gravity,
|
2014-05-20 21:47:10 +00:00
|
|
|
MetaRectangle frame_rect);
|
2014-04-28 21:44:45 +00:00
|
|
|
|
2014-04-29 19:30:21 +00:00
|
|
|
void meta_window_grab_op_began (MetaWindow *window, MetaGrabOp op);
|
|
|
|
void meta_window_grab_op_ended (MetaWindow *window, MetaGrabOp op);
|
|
|
|
|
2014-05-20 18:48:08 +00:00
|
|
|
void meta_window_set_alive (MetaWindow *window, gboolean is_alive);
|
|
|
|
|
2014-06-12 21:01:13 +00:00
|
|
|
gboolean meta_window_has_pointer (MetaWindow *window);
|
|
|
|
|
2015-03-23 13:22:19 +00:00
|
|
|
void meta_window_emit_size_changed (MetaWindow *window);
|
|
|
|
|
2016-02-01 10:46:11 +00:00
|
|
|
MetaPlacementRule *meta_window_get_placement_rule (MetaWindow *window);
|
|
|
|
|
2017-06-21 11:30:22 +00:00
|
|
|
void meta_window_force_placement (MetaWindow *window,
|
|
|
|
gboolean force_move);
|
2016-02-01 10:46:11 +00:00
|
|
|
|
2017-03-17 12:34:52 +00:00
|
|
|
void meta_window_force_restore_shortcuts (MetaWindow *window,
|
|
|
|
ClutterInputDevice *source);
|
|
|
|
|
|
|
|
gboolean meta_window_shortcuts_inhibited (MetaWindow *window,
|
|
|
|
ClutterInputDevice *source);
|
2018-01-09 12:19:40 +00:00
|
|
|
gboolean meta_window_is_stackable (MetaWindow *window);
|
Add support for _NET_WM_USER_TIME
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
|
|
|
#endif
|