Compare commits

...

4 Commits

Author SHA1 Message Date
Florian Müllner f1e2121b5e Bump version to 48.2
Update NEWS.
2025-05-24 19:10:03 +02:00
Neal Gompa 27c86490c2 build: Do not install anything in xsessions when X11 is disabled
Fixes: b05eb4eb6d ("build: Allow disabling the X11 session")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/400>
(cherry picked from commit 2552c92fe1)
2025-05-23 19:09:47 +02:00
Neal Gompa 64900f4a2e build: Allow disabling the X11 session
This is consistent with gnome-session and the rest of the GNOME
session stack.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/396>
(cherry picked from commit b05eb4eb6d)
2025-05-23 19:09:32 +02:00
Daniel Buch Hansen bf84e5d58f 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: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/395>
(cherry picked from commit e06b1e8236)
2025-05-23 19:09:21 +02:00
6 changed files with 34 additions and 11 deletions
+8
View File
@@ -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 48.1
==== ====
+7 -2
View File
@@ -2,14 +2,19 @@
# #
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
have_x11 = get_option('x11')
session_desktop_base = 'gnome-classic' session_desktop_base = 'gnome-classic'
session_desktops = [ session_desktops = [
session_desktop_base, session_desktop_base,
session_desktop_base + '-xorg',
session_desktop_base + '-wayland', session_desktop_base + '-wayland',
] ]
if have_x11
session_desktops += [session_desktop_base + '-xorg']
endif
foreach name : session_desktops foreach name : session_desktops
session_desktop = name + '.desktop' session_desktop = name + '.desktop'
if name.endswith('-xorg') if name.endswith('-xorg')
@@ -21,7 +26,7 @@ foreach name : session_desktops
# There is a workaround in meson/session-post-install.py until proper # There is a workaround in meson/session-post-install.py until proper
# solution arises: # solution arises:
# https://github.com/mesonbuild/meson/issues/2416 # https://github.com/mesonbuild/meson/issues/2416
session_instdir = xsessiondir session_instdir = wlsessiondir
#session_instdir = [ xesssiondir, wlsessiondir ] #session_instdir = [ xesssiondir, wlsessiondir ]
endif endif
i18n.merge_file( i18n.merge_file(
+2 -2
View File
@@ -173,7 +173,7 @@ export default class Extension {
this._injectionManager.overrideMethod(viewProto, '_hideTooltips', () => { this._injectionManager.overrideMethod(viewProto, '_hideTooltips', () => {
/* eslint-disable no-invalid-this */ /* eslint-disable no-invalid-this */
return function () { return function () {
if (global.stage.get_key_focus() === global.stage) if (global.stage.get_key_focus() === null)
global.stage.set_key_focus(this._prevFocusActor); global.stage.set_key_focus(this._prevFocusActor);
this._pickWindow = false; this._pickWindow = false;
for (let i = 0; i < this._workspaces.length; i++) for (let i = 0; i < this._workspaces.length; i++)
@@ -235,7 +235,7 @@ export default class Extension {
return true; return true;
} }
if (global.stage.get_key_focus() !== global.stage) if (global.stage.get_key_focus() !== null)
return false; return false;
// ignore shift presses, they're required to get numerals in azerty keyboards // ignore shift presses, they're required to get numerals in azerty keyboards
+9 -5
View File
@@ -4,7 +4,7 @@
project( project(
'gnome-shell-extensions', 'gnome-shell-extensions',
version: '48.1', version: '48.2',
meson_version: '>= 1.1.0', meson_version: '>= 1.1.0',
license: 'GPL-2.0-or-later', license: 'GPL-2.0-or-later',
) )
@@ -31,6 +31,8 @@ shell_version = ver_arr[0]
uuid_suffix = '@gnome-shell-extensions.gcampax.github.com' uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
have_x11 = get_option('x11')
classic_extensions = [ classic_extensions = [
'apps-menu', 'apps-menu',
'places-menu', 'places-menu',
@@ -86,10 +88,12 @@ endforeach
if classic_mode_enabled if classic_mode_enabled
subdir('data') subdir('data')
meson.add_install_script( if have_x11
'meson/session-post-install.py', meson.add_install_script(
join_paths(get_option('prefix'), datadir), 'meson/session-post-install.py',
) join_paths(get_option('prefix'), datadir),
)
endif
endif endif
subdir('extensions') subdir('extensions')
+6
View File
@@ -20,3 +20,9 @@ option('classic_mode',
value: false, value: false,
description: 'Enable installing data files for classic mode.' description: 'Enable installing data files for classic mode.'
) )
option('x11',
type: 'boolean',
value: true,
description: 'Enable X11 session support.'
)
+2 -2
View File
@@ -15,10 +15,10 @@ else:
# FIXME: Meson is unable to copy a generated target file: # FIXME: Meson is unable to copy a generated target file:
# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 # 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): if not os.path.exists(dst_dir):
os.makedirs(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') dst = os.path.join(dst_dir, 'gnome-classic.desktop')
shutil.copyfile(src, dst) shutil.copyfile(src, dst)