2014-03-18 15:20:22 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2001 Havoc Pennington, Anders Carlsson
|
|
|
|
* Copyright (C) 2002, 2003 Red Hat, Inc.
|
|
|
|
* Copyright (C) 2003 Rob Adams
|
|
|
|
* Copyright (C) 2004-2006 Elijah Newren
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_WINDOW_X11_PRIVATE_H
|
|
|
|
#define META_WINDOW_X11_PRIVATE_H
|
|
|
|
|
2018-07-10 08:36:24 +00:00
|
|
|
#include "core/window-private.h"
|
2014-07-14 16:01:22 +00:00
|
|
|
#include "x11/iconcache.h"
|
2022-09-07 12:26:54 +00:00
|
|
|
#include "x11/meta-sync-counter.h"
|
2019-08-20 19:38:35 +00:00
|
|
|
#include "x11/window-x11.h"
|
2014-06-04 13:53:29 +00:00
|
|
|
|
2014-03-18 15:20:22 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2019-08-20 19:46:50 +00:00
|
|
|
/*
|
|
|
|
* Mirrors _NET_WM_BYPASS_COMPOSITOR preference values.
|
|
|
|
*/
|
|
|
|
typedef enum _MetaBypassCompositorHint
|
|
|
|
{
|
|
|
|
META_BYPASS_COMPOSITOR_HINT_AUTO = 0,
|
|
|
|
META_BYPASS_COMPOSITOR_HINT_ON = 1,
|
|
|
|
META_BYPASS_COMPOSITOR_HINT_OFF = 2,
|
|
|
|
} MetaBypassCompositorHint;
|
|
|
|
|
2014-03-18 15:20:22 +00:00
|
|
|
typedef struct _MetaWindowX11Private MetaWindowX11Private;
|
|
|
|
|
|
|
|
struct _MetaWindowX11Private
|
|
|
|
{
|
|
|
|
/* TRUE if the client forced these on */
|
|
|
|
guint wm_state_skip_taskbar : 1;
|
|
|
|
guint wm_state_skip_pager : 1;
|
2019-01-30 19:19:41 +00:00
|
|
|
guint wm_take_focus : 1;
|
2019-01-30 19:41:11 +00:00
|
|
|
guint wm_ping : 1;
|
2019-01-30 19:40:17 +00:00
|
|
|
guint wm_delete_window : 1;
|
2014-03-18 17:07:50 +00:00
|
|
|
|
|
|
|
/* Weird "_NET_WM_STATE_MODAL" flag */
|
|
|
|
guint wm_state_modal : 1;
|
|
|
|
|
|
|
|
/* Info on which props we got our attributes from */
|
|
|
|
guint using_net_wm_name : 1; /* vs. plain wm_name */
|
|
|
|
guint using_net_wm_visible_name : 1; /* tracked so we can clear it */
|
2014-03-19 01:15:49 +00:00
|
|
|
|
|
|
|
Atom type_atom;
|
2014-04-29 19:55:55 +00:00
|
|
|
|
2022-05-16 14:48:01 +00:00
|
|
|
XWindowAttributes attributes;
|
|
|
|
|
2014-05-20 13:19:10 +00:00
|
|
|
/* Requested geometry */
|
|
|
|
int border_width;
|
|
|
|
|
2014-12-30 01:20:07 +00:00
|
|
|
gboolean showing_resize_popup;
|
2014-05-20 21:47:10 +00:00
|
|
|
|
|
|
|
/* These are in server coordinates. If we have a frame, it's
|
|
|
|
* relative to the frame. */
|
|
|
|
MetaRectangle client_rect;
|
2014-07-14 16:01:22 +00:00
|
|
|
|
|
|
|
MetaIconCache icon_cache;
|
|
|
|
Pixmap wm_hints_pixmap;
|
|
|
|
Pixmap wm_hints_mask;
|
2019-12-06 12:04:12 +00:00
|
|
|
|
2022-01-28 23:02:24 +00:00
|
|
|
cairo_surface_t *icon;
|
|
|
|
cairo_surface_t *mini_icon;
|
|
|
|
guint update_icon_handle_id;
|
|
|
|
|
2019-12-06 12:04:12 +00:00
|
|
|
/* Freeze/thaw on resize (for Xwayland) */
|
|
|
|
gboolean thaw_after_paint;
|
2019-08-20 19:46:50 +00:00
|
|
|
|
|
|
|
/* Bypass compositor hints */
|
|
|
|
MetaBypassCompositorHint bypass_compositor;
|
2022-09-07 12:26:54 +00:00
|
|
|
|
|
|
|
MetaSyncCounter sync_counter;
|
2014-03-18 15:20:22 +00:00
|
|
|
};
|
|
|
|
|
2019-08-20 19:38:35 +00:00
|
|
|
MetaWindowX11Private * meta_window_x11_get_private (MetaWindowX11 *window_x11);
|
|
|
|
|
2019-08-20 19:46:50 +00:00
|
|
|
void meta_window_x11_set_bypass_compositor_hint (MetaWindowX11 *window_x11,
|
|
|
|
MetaBypassCompositorHint requested_value);
|
|
|
|
|
2022-01-28 23:02:24 +00:00
|
|
|
void meta_window_x11_queue_update_icon (MetaWindowX11 *window_x11);
|
|
|
|
|
x11: Integrate frames client into Mutter
Replace the in-process implementation of frames with the external
frames client.
When a client window is created and managed by Mutter, Mutter will
determine whether it is a window that requires decorations and
hint the creation of a frame for it by setting the _MUTTER_NEEDS_FRAME
property on the client window.
After the frames client created a window that has the _MUTTER_FRAME_FOR
property, Mutter will proceed to reparent the client window on the
frame window, and show them as a single unit.
Rendering and event handling on the frame window will be performed by
the external client, Mutter is still responsible for everything else,
namely resizing client and frame window in synchronization, and
managing updates on the MetaWindowActor.
In order to let the frame be managed by the external client, Mutter
needs to change the way some properties are forwarded to the client
and/or frame windows. Some properties are necessary to keep propagating
to the client window only, some others need to happen on the frame
window now, and some others needs to be propagated on both so they
are synchronized about the behavior.
Also, some events that were previously totally unexpected in frame
windows are now susceptible to happen, so must be allowed now.
MetaFrame in src/core/frame.c now acts as the wrapper of foreign
windows created by the frames client, from the Mutter side. Location,
size, and lifetime are still largely in control of Mutter, some
details like visible/invisible borders are obtained from the client
instead (through the _MUTTER_FRAME_EXTENTS and _GTK_FRAME_EXTENTS
properties, respectively).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175>
2022-09-08 08:35:47 +00:00
|
|
|
void meta_window_x11_initialize_state (MetaWindow *window);
|
|
|
|
|
2014-03-18 15:20:22 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif
|