mutter/mutter-SLE-bell.patch

120 lines
4.0 KiB
Diff
Raw Normal View History

diff --unified --recursive --text --new-file --color mutter-40.0.old/data/org.gnome.mutter.gschema.xml.in mutter-40.0.new/data/org.gnome.mutter.gschema.xml.in
--- mutter-40.0.old/data/org.gnome.mutter.gschema.xml.in 2021-04-23 08:52:33.870911873 +0800
+++ mutter-40.0.new/data/org.gnome.mutter.gschema.xml.in 2021-04-23 08:53:11.404056017 +0800
@@ -156,6 +156,16 @@
</description>
</key>
+ <key name="audible-bell-force-through-server" type="b">
+ <default>false</default>
+ <summary>Force the System Bell through the X server only.</summary>
+ <description>
+ Force the System Bell through the X server only for systems that
+ do not want to go through the sound card - for example that don't
+ have speakers.
+ </description>
+ </key>
+
<child name="keybindings" schema="org.gnome.mutter.keybindings"/>
</schema>
diff --unified --recursive --text --new-file --color mutter-40.0.old/src/core/bell.c mutter-40.0.new/src/core/bell.c
--- mutter-40.0.old/src/core/bell.c 2021-04-23 08:52:33.877578506 +0800
+++ mutter-40.0.new/src/core/bell.c 2021-04-23 08:53:11.404056017 +0800
@@ -54,6 +54,11 @@
#include "core/window-private.h"
#include "meta/compositor.h"
+#include "meta/display.h"
+#include "meta/meta-x11-display.h"
+#include <X11/Xlib.h>
+#include <X11/XKBlib.h>
+
G_DEFINE_TYPE (MetaBell, meta_bell, G_TYPE_OBJECT)
enum
@@ -202,6 +207,14 @@
if (meta_prefs_get_visual_bell ())
bell_visual_notify (display, window);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+ if (meta_prefs_bell_force_through_server ())
+ {
+ MetaX11Display *x11_display = meta_display_get_x11_display (display);
+ Display *xdisplay = meta_x11_display_get_xdisplay (x11_display);
+ XkbForceBell (xdisplay, 100);
+ return TRUE;
+ }
+
if (meta_prefs_bell_is_audible ())
return bell_audible_notify (display, window);
diff --unified --recursive --text --new-file --color mutter-40.0.old/src/core/prefs.c mutter-40.0.new/src/core/prefs.c
--- mutter-40.0.old/src/core/prefs.c 2021-04-23 08:52:33.877578506 +0800
+++ mutter-40.0.new/src/core/prefs.c 2021-04-23 08:53:11.404056017 +0800
@@ -98,6 +98,7 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
static gboolean focus_change_on_pointer_rest = FALSE;
static gboolean bell_is_visible = FALSE;
static gboolean bell_is_audible = TRUE;
+static gboolean bell_force_through_server = FALSE;
static gboolean gnome_accessibility = FALSE;
static gboolean gnome_animations = TRUE;
static gboolean locate_pointer_is_enabled = FALSE;
@@ -352,6 +353,13 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
&bell_is_audible, /* FIXME: change the name: it's confusing */
},
{
+ { "audible-bell-force-through-server",
+ SCHEMA_MUTTER,
+ META_PREF_AUDIBLE_BELL_FORCE_THROUGH_SERVER,
+ },
+ &bell_force_through_server,
+ },
+ {
{ KEY_GNOME_ACCESSIBILITY,
SCHEMA_INTERFACE,
META_PREF_GNOME_ACCESSIBILITY,
@@ -1714,6 +1722,9 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
case META_PREF_AUDIBLE_BELL:
return "AUDIBLE_BELL";
+ case META_PREF_AUDIBLE_BELL_FORCE_THROUGH_SERVER:
+ return "AUDIBLE_BELL_FORCE_THROUGH_SERVER";
+
case META_PREF_VISUAL_BELL_TYPE:
return "VISUAL_BELL_TYPE";
@@ -1992,6 +2003,12 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
return bell_is_audible;
}
+gboolean
+meta_prefs_bell_force_through_server (void)
+{
+ return bell_force_through_server;
+}
+
GDesktopVisualBellType
meta_prefs_get_visual_bell_type (void)
{
diff --unified --recursive --text --new-file --color mutter-40.0.old/src/meta/prefs.h mutter-40.0.new/src/meta/prefs.h
--- mutter-40.0.old/src/meta/prefs.h 2021-04-23 08:52:33.877578506 +0800
+++ mutter-40.0.new/src/meta/prefs.h 2021-04-23 08:53:11.404056017 +0800
@@ -91,6 +91,7 @@
META_PREF_WORKSPACE_NAMES,
META_PREF_VISUAL_BELL,
META_PREF_AUDIBLE_BELL,
+ META_PREF_AUDIBLE_BELL_FORCE_THROUGH_SERVER,
META_PREF_VISUAL_BELL_TYPE,
META_PREF_GNOME_ACCESSIBILITY,
META_PREF_GNOME_ANIMATIONS,
@@ -480,6 +481,9 @@
gboolean meta_prefs_bell_is_audible (void);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
META_EXPORT
+gboolean meta_prefs_bell_force_through_server (void);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+
+META_EXPORT
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - Update to GNOME 3.20 Fate#318572 - Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch - Refresh mutter-grab-display.patch, mutter-bell.patch, relax-some-constraints-on-CSD-windows-in-sle-classic.patch - Update mutter-bell.patch so it works on all cases (bnc#889218) - Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch: CSD (Client Side Decoration) windows have invisible box wrapping around them, which leads to some positioning issues as in this bug report. Relax some constraints on window positioning for CSD windows s.t. they can be placed at the very top of the monitor. This fix works nicely for "sle-classic" as there is no top bar any more, and is NOT applied in other GNOME sessions for reasons stated in bgo#719772 (bnc#883491). - Add mutter-bnc879109-no-monitors-crash.patch: Fixes a crash in Mutter when there are no usable monitors, such as when a laptop is booted with the lid closed while on a docking station, with the intent of plugging an external monitor later (bnc#879109). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
META_EXPORT