Compare commits
No commits in common. "c8" and "c8-beta" have entirely different histories.
@ -1,111 +0,0 @@
|
||||
From 5e07478843893af969601fa0c4ed49d2bb95b04e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels@gmail.com>
|
||||
Date: Mon, 31 Dec 2018 16:29:11 +0200
|
||||
Subject: [PATCH] x11-display: add support for _GTK_WORKAREAS_Dn
|
||||
|
||||
In addition to existing _NET_WORKAREA property set also new
|
||||
_GTK_WORKAREAS_Dn property where n is desktop number (between 0
|
||||
and _NET_NUMBER_OF_DESKTOPS - 1).
|
||||
|
||||
https://mail.gnome.org/archives/wm-spec-list/2018-December/msg00000.html
|
||||
https://gitlab.freedesktop.org/xdg/xdg-specs/merge_requests/22
|
||||
|
||||
https://gitlab.gnome.org/GNOME/mutter/merge_requests/370
|
||||
---
|
||||
src/x11/atomnames.h | 1 +
|
||||
src/x11/meta-x11-display.c | 53 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/src/x11/atomnames.h b/src/x11/atomnames.h
|
||||
index 4c1b49ede0..4b25b099af 100644
|
||||
--- a/src/x11/atomnames.h
|
||||
+++ b/src/x11/atomnames.h
|
||||
@@ -63,6 +63,7 @@ item(_GTK_MENUBAR_OBJECT_PATH)
|
||||
item(_GTK_FRAME_EXTENTS)
|
||||
item(_GTK_SHOW_WINDOW_MENU)
|
||||
item(_GTK_EDGE_CONSTRAINTS)
|
||||
+item(_GTK_WORKAREAS)
|
||||
item(_GNOME_WM_KEYBINDINGS)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
|
||||
index 3e59c96c67..87d8a2bfaf 100644
|
||||
--- a/src/x11/meta-x11-display.c
|
||||
+++ b/src/x11/meta-x11-display.c
|
||||
@@ -604,6 +604,7 @@ set_supported_hint (MetaX11Display *x11_display)
|
||||
x11_display->atom__GTK_FRAME_EXTENTS,
|
||||
x11_display->atom__GTK_SHOW_WINDOW_MENU,
|
||||
x11_display->atom__GTK_EDGE_CONSTRAINTS,
|
||||
+ x11_display->atom__GTK_WORKAREAS,
|
||||
};
|
||||
|
||||
XChangeProperty (x11_display->xdisplay,
|
||||
@@ -913,6 +914,56 @@ set_workspace_names (MetaX11Display *x11_display)
|
||||
g_string_free (flattened, TRUE);
|
||||
}
|
||||
|
||||
+static void
|
||||
+set_workspace_work_area_hint (MetaWorkspace *workspace,
|
||||
+ MetaX11Display *x11_display)
|
||||
+{
|
||||
+ MetaMonitorManager *monitor_manager;
|
||||
+ GList *logical_monitors;
|
||||
+ GList *l;
|
||||
+ int num_monitors;
|
||||
+ unsigned long *data;
|
||||
+ unsigned long *tmp;
|
||||
+ g_autofree char *workarea_name;
|
||||
+ Atom workarea_atom;
|
||||
+
|
||||
+ monitor_manager = meta_backend_get_monitor_manager (meta_get_backend ());
|
||||
+ logical_monitors = meta_monitor_manager_get_logical_monitors (monitor_manager);
|
||||
+ num_monitors = meta_monitor_manager_get_num_logical_monitors (monitor_manager);
|
||||
+
|
||||
+ data = g_new (unsigned long, num_monitors * 4);
|
||||
+ tmp = data;
|
||||
+
|
||||
+ for (l = logical_monitors; l; l = l->next)
|
||||
+ {
|
||||
+ MetaRectangle area;
|
||||
+
|
||||
+ meta_workspace_get_work_area_for_logical_monitor (workspace, l->data, &area);
|
||||
+
|
||||
+ tmp[0] = area.x;
|
||||
+ tmp[1] = area.y;
|
||||
+ tmp[2] = area.width;
|
||||
+ tmp[3] = area.height;
|
||||
+
|
||||
+ tmp += 4;
|
||||
+ }
|
||||
+
|
||||
+ workarea_name = g_strdup_printf ("_GTK_WORKAREAS_D%d",
|
||||
+ meta_workspace_index (workspace));
|
||||
+
|
||||
+ workarea_atom = XInternAtom (x11_display->xdisplay, workarea_name, False);
|
||||
+
|
||||
+ meta_x11_error_trap_push (x11_display);
|
||||
+ XChangeProperty (x11_display->xdisplay,
|
||||
+ x11_display->xroot,
|
||||
+ workarea_atom,
|
||||
+ XA_CARDINAL, 32, PropModeReplace,
|
||||
+ (guchar*) data, num_monitors * 4);
|
||||
+ meta_x11_error_trap_pop (x11_display);
|
||||
+
|
||||
+ g_free (data);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
set_work_area_hint (MetaDisplay *display,
|
||||
MetaX11Display *x11_display)
|
||||
@@ -932,6 +983,8 @@ set_work_area_hint (MetaDisplay *display,
|
||||
MetaWorkspace *workspace = l->data;
|
||||
|
||||
meta_workspace_get_work_area_all_monitors (workspace, &area);
|
||||
+ set_workspace_work_area_hint (workspace, x11_display);
|
||||
+
|
||||
tmp[0] = area.x;
|
||||
tmp[1] = area.y;
|
||||
tmp[2] = area.width;
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,101 +0,0 @@
|
||||
From eb99d91c61d1a7e33ee6c8efa47ba7214cf913e3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@redhat.com>
|
||||
Date: Wed, 4 Dec 2024 14:04:45 +0100
|
||||
Subject: [PATCH] x11/iconcache: Turn icons from WM_HINTS pixmaps to cairo
|
||||
image surface
|
||||
|
||||
There were two problems with how windows icons coming from WM_HINTS were handled:
|
||||
|
||||
Only xlib cairo surfaces directly from Pixmap's were created, while the
|
||||
gnome-shell image cache only supported handling image surfaces. Address this by
|
||||
creating a cairo image surface, and paint the pixmap cairo surface onto it,
|
||||
later discarding the pixmap surface.
|
||||
|
||||
Cairo surfaces were only created given a matching X11 visual. This only worked
|
||||
for pixmaps with a bit depth of 24 or higher, meaning bitmap pixmaps got
|
||||
discarded. Address this by creating bitmap surfaces using
|
||||
cairo_xlib_surface_create_for_bitmap(), then using the bitmap surface as a mask
|
||||
drawing it using black on a white surface.
|
||||
---
|
||||
src/x11/iconcache.c | 57 +++++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 52 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/x11/iconcache.c b/src/x11/iconcache.c
|
||||
index 521c77b8d2..f085a5ec1b 100644
|
||||
--- a/src/x11/iconcache.c
|
||||
+++ b/src/x11/iconcache.c
|
||||
@@ -293,7 +293,6 @@ surface_from_pixmap (Display *xdisplay, Pixmap xpixmap,
|
||||
int width, int height)
|
||||
{
|
||||
Window root_return;
|
||||
- XVisualInfo visual_info;
|
||||
int x_ret, y_ret;
|
||||
unsigned int w_ret, h_ret, bw_ret, depth_ret;
|
||||
|
||||
@@ -301,11 +300,59 @@ surface_from_pixmap (Display *xdisplay, Pixmap xpixmap,
|
||||
&x_ret, &y_ret, &w_ret, &h_ret, &bw_ret, &depth_ret))
|
||||
return NULL;
|
||||
|
||||
- if (!XMatchVisualInfo (xdisplay, DefaultScreen (xdisplay),
|
||||
- depth_ret, TrueColor, &visual_info))
|
||||
- return NULL;
|
||||
+ if (depth_ret == 1)
|
||||
+ {
|
||||
+ cairo_surface_t *bitmap_surface;
|
||||
+ cairo_surface_t *icon_surface;
|
||||
+ cairo_t *cr;
|
||||
|
||||
- return cairo_xlib_surface_create (xdisplay, xpixmap, visual_info.visual, w_ret, h_ret);
|
||||
+ bitmap_surface =
|
||||
+ cairo_xlib_surface_create_for_bitmap (xdisplay,
|
||||
+ xpixmap,
|
||||
+ DefaultScreenOfDisplay (xdisplay),
|
||||
+ w_ret,
|
||||
+ h_ret);
|
||||
+
|
||||
+ icon_surface = cairo_surface_create_similar_image (bitmap_surface,
|
||||
+ CAIRO_FORMAT_ARGB32,
|
||||
+ w_ret, h_ret);
|
||||
+ cr = cairo_create (icon_surface);
|
||||
+ cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
|
||||
+ cairo_fill (cr);
|
||||
+ cairo_paint (cr);
|
||||
+ cairo_set_source_surface (cr, bitmap_surface, 0, 0);
|
||||
+ cairo_set_operator (cr, CAIRO_OPERATOR_MULTIPLY);
|
||||
+ cairo_paint_with_alpha (cr, 1.0);
|
||||
+ cairo_destroy (cr);
|
||||
+ cairo_surface_destroy (bitmap_surface);
|
||||
+ return icon_surface;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ XVisualInfo visual_info;
|
||||
+ cairo_surface_t *pixmap_surface;
|
||||
+ cairo_surface_t *icon_surface;
|
||||
+ cairo_t *cr;
|
||||
+
|
||||
+ if (!XMatchVisualInfo (xdisplay, DefaultScreen (xdisplay),
|
||||
+ depth_ret, TrueColor, &visual_info))
|
||||
+ return NULL;
|
||||
+
|
||||
+ pixmap_surface = cairo_xlib_surface_create (xdisplay,
|
||||
+ xpixmap,
|
||||
+ visual_info.visual,
|
||||
+ w_ret,
|
||||
+ h_ret);
|
||||
+ icon_surface = cairo_surface_create_similar_image (pixmap_surface,
|
||||
+ CAIRO_FORMAT_ARGB32,
|
||||
+ w_ret, h_ret);
|
||||
+ cr = cairo_create (icon_surface);
|
||||
+ cairo_set_source_surface (cr, pixmap_surface, 0, 0);
|
||||
+ cairo_paint (cr);
|
||||
+ cairo_destroy (cr);
|
||||
+ cairo_surface_destroy (pixmap_surface);
|
||||
+ return icon_surface;
|
||||
+ }
|
||||
}
|
||||
|
||||
static gboolean
|
||||
--
|
||||
2.44.0.501.g19981daefd.dirty
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Name: mutter
|
||||
Version: 3.32.2
|
||||
Release: 74%{?dist}
|
||||
Release: 72%{?dist}
|
||||
Summary: Window and compositing manager based on Clutter
|
||||
|
||||
License: GPLv2+
|
||||
@ -217,12 +217,6 @@ Patch531: 0001-renderer-native-Queue-fail-safe-callbacks-when-mode-.patch
|
||||
|
||||
Patch532: 0001-core-Change-MetaWaylandTextInput-event-forwarding-to.patch
|
||||
|
||||
# RHEL-35286
|
||||
Patch533: 0001-x11-iconcache-Turn-icons-from-WM_HINTS-pixmaps-to-ca.patch
|
||||
|
||||
# RHEL-87743
|
||||
Patch534: 0001-x11-display-add-support-for-_GTK_WORKAREAS_Dn.patch
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: pango-devel
|
||||
BuildRequires: startup-notification-devel
|
||||
@ -364,14 +358,6 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/mutter-%{mutter_api_version}/tests
|
||||
|
||||
%changelog
|
||||
* Fri Jun 27 2025 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-74
|
||||
- Backport implementation for _GTK_WORKAREAS_D# X11 property
|
||||
Related: RHEL-87743
|
||||
|
||||
* Wed Dec 04 2024 Jonas Ådahl <jadahl@redhat.com> - 3.32.2-73
|
||||
- Fix handling of more WM_HINTS window icon types
|
||||
Resolves: RHEL-35286
|
||||
|
||||
* Mon Oct 02 2023 Jan Grulich <jgrulich@redhat.com> - 3.32.2-72
|
||||
- Do not use DMA buffers for screencast when the client doesn't support it
|
||||
- Use DMA buffers only for i195 drivers
|
||||
|
||||
Loading…
Reference in New Issue
Block a user