From bf84e5d58f8a78e72410f0b0e773dcd5d21eefff Mon Sep 17 00:00:00 2001 From: Daniel Buch Hansen Date: Sun, 13 Apr 2025 21:02:14 +0200 Subject: [PATCH 1/4] windowsNavigator: Adjust to get_key_focus() changes in Clutter Clutter.Stage.get_key_focus() now always returns the value of the Clutter.Stage.keyFocus property, whereas previously it would return the stage itself when no explicit focus was set. Adjust the code accordingly. Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/561 Part-of: (cherry picked from commit e06b1e8236d2af4f989bef57e43754a480baa97e) --- extensions/windowsNavigator/extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js index 49dce1e8..600aae79 100644 --- a/extensions/windowsNavigator/extension.js +++ b/extensions/windowsNavigator/extension.js @@ -173,7 +173,7 @@ export default class Extension { this._injectionManager.overrideMethod(viewProto, '_hideTooltips', () => { /* eslint-disable no-invalid-this */ return function () { - if (global.stage.get_key_focus() === global.stage) + if (global.stage.get_key_focus() === null) global.stage.set_key_focus(this._prevFocusActor); this._pickWindow = false; for (let i = 0; i < this._workspaces.length; i++) @@ -235,7 +235,7 @@ export default class Extension { return true; } - if (global.stage.get_key_focus() !== global.stage) + if (global.stage.get_key_focus() !== null) return false; // ignore shift presses, they're required to get numerals in azerty keyboards From 64900f4a2e99000d4f93985efc76f80a395f843c Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 24 Apr 2025 09:40:01 -0400 Subject: [PATCH 2/4] build: Allow disabling the X11 session This is consistent with gnome-session and the rest of the GNOME session stack. Part-of: (cherry picked from commit b05eb4eb6d89a42c224d783183854c4d01e9d3ac) --- data/meson.build | 7 ++++++- meson.options | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/data/meson.build b/data/meson.build index 35f00e72..e7df7aee 100644 --- a/data/meson.build +++ b/data/meson.build @@ -2,14 +2,19 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +have_x11 = get_option('x11') + session_desktop_base = 'gnome-classic' session_desktops = [ session_desktop_base, - session_desktop_base + '-xorg', session_desktop_base + '-wayland', ] +if have_x11 + session_desktops += [session_desktop_base + '-xorg'] +endif + foreach name : session_desktops session_desktop = name + '.desktop' if name.endswith('-xorg') diff --git a/meson.options b/meson.options index ddf62fa1..1e3efb2e 100644 --- a/meson.options +++ b/meson.options @@ -20,3 +20,9 @@ option('classic_mode', value: false, description: 'Enable installing data files for classic mode.' ) + +option('x11', + type: 'boolean', + value: true, + description: 'Enable X11 session support.' +) From 27c86490c295dd23a54b21bdb3fca63ee8e9a32e Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 12 May 2025 16:48:53 -0400 Subject: [PATCH 3/4] build: Do not install anything in xsessions when X11 is disabled Fixes: b05eb4eb6d ("build: Allow disabling the X11 session") Part-of: (cherry picked from commit 2552c92fe1200b792ce20b39299efff3eee9fe86) --- data/meson.build | 2 +- meson.build | 12 ++++++++---- meson/session-post-install.py | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/data/meson.build b/data/meson.build index e7df7aee..4c8696be 100644 --- a/data/meson.build +++ b/data/meson.build @@ -26,7 +26,7 @@ foreach name : session_desktops # There is a workaround in meson/session-post-install.py until proper # solution arises: # https://github.com/mesonbuild/meson/issues/2416 - session_instdir = xsessiondir + session_instdir = wlsessiondir #session_instdir = [ xesssiondir, wlsessiondir ] endif i18n.merge_file( diff --git a/meson.build b/meson.build index 396b5e23..cb4c3a03 100644 --- a/meson.build +++ b/meson.build @@ -31,6 +31,8 @@ shell_version = ver_arr[0] uuid_suffix = '@gnome-shell-extensions.gcampax.github.com' +have_x11 = get_option('x11') + classic_extensions = [ 'apps-menu', 'places-menu', @@ -86,10 +88,12 @@ endforeach if classic_mode_enabled subdir('data') - meson.add_install_script( - 'meson/session-post-install.py', - join_paths(get_option('prefix'), datadir), - ) + if have_x11 + meson.add_install_script( + 'meson/session-post-install.py', + join_paths(get_option('prefix'), datadir), + ) + endif endif subdir('extensions') diff --git a/meson/session-post-install.py b/meson/session-post-install.py index f1d6ae32..cfc55c2a 100755 --- a/meson/session-post-install.py +++ b/meson/session-post-install.py @@ -15,10 +15,10 @@ else: # FIXME: Meson is unable to copy a generated target file: # https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 -dst_dir = os.path.join(install_root, 'wayland-sessions') +dst_dir = os.path.join(install_root, 'xsessions') if not os.path.exists(dst_dir): os.makedirs(dst_dir) -src = os.path.join(install_root, 'xsessions', 'gnome-classic.desktop') +src = os.path.join(install_root, 'wayland-sessions', 'gnome-classic.desktop') dst = os.path.join(dst_dir, 'gnome-classic.desktop') shutil.copyfile(src, dst) From f1e2121b5e7a58a75c795a7a98d744c4cda771b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 24 May 2025 19:10:03 +0200 Subject: [PATCH 4/4] Bump version to 48.2 Update NEWS. --- NEWS | 8 ++++++++ meson.build | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 34600c1b..3146e0cc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +48.2 +==== +* windowsNavigator: Fix handling keyboard shortcuts [Daniel; !395] +* build: Allow disabling the X11 session [Neal; !396, !400] + +Contributors: + Daniel Buch Hansen, Neal Gompa + 48.1 ==== diff --git a/meson.build b/meson.build index cb4c3a03..3f5eadef 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project( 'gnome-shell-extensions', - version: '48.1', + version: '48.2', meson_version: '>= 1.1.0', license: 'GPL-2.0-or-later', )