Compare commits

..

10 Commits

Author SHA1 Message Date
Jeremy Bicha
14be3c2c29 releasing package gnome-shell-extensions version 42.3-0ubuntu1 2022-07-13 17:52:40 +02:00
Jeremy Bicha
861e8c9757 Merge tag 'upstream/42.3' into ubuntu/jammy
Upstream version 42.3
2022-07-13 17:52:06 +02:00
Jeremy Bicha
fcefdc3271 New upstream version 42.3 2022-07-13 17:46:10 +02:00
Florian Müllner
8b62c38e20 Bump version to 42.3
Update NEWS.
2022-07-02 18:41:28 +02:00
Florian Müllner
4667b4704d window-list: Open menu on long press
Right-click isn't available on touch, so implement long-press as
an alternative.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/146

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/233>
2022-06-20 14:45:58 +02:00
Florian Müllner
fe60614b41 window-list: Fix primary button action on touch
If a click event was triggered via touch rather than a pointer
device, the button parameter is 0 rather than a mouse button
number.

Account for that to make sure that touch events are not misinterpreted
as right clicks.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/146

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/233>
2022-06-20 14:45:58 +02:00
Florian Müllner
1e833f542f screenshot-window-sizer: Delay size popup
We use the actual frame size for the popup rather than the target
size. That means (on wayland), we have to wait for the size to
actually change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/232>
2022-06-09 19:20:44 +02:00
Florian Müllner
faabfa11c2 screenshot-window-sizer: Remove superfluous check
We already filter out sizes that don't fit the screen when
building the scaledSizes array, no need to check again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/232>
2022-06-09 19:06:24 +02:00
Jeremy Bicha
2da0cd7864 releasing package gnome-shell-extensions version 42.1-0ubuntu1 2022-05-09 08:21:34 -04:00
Jeremy Bicha
e9c7fddbf3 Update Vcs fields 2022-05-09 08:17:37 -04:00
8 changed files with 82 additions and 19 deletions

8
NEWS
View File

@@ -1,3 +1,11 @@
42.3
====
* screenshot-window-sizer: Fix reported sizes on wayland [Florian; !232]
* window-list: Improve touch support [Florian; !233]
Contributors:
Florian Müllner
42.2
====
* native-window-placement: Adjust to gnome-shell 42 changes [Florian; !229]

8
debian/changelog vendored
View File

@@ -1,10 +1,10 @@
gnome-shell-extensions (42.2-1) unstable; urgency=medium
gnome-shell-extensions (42.3-0ubuntu1) jammy; urgency=medium
* New upstream release
* New upstream release (LP: #1981606)
-- Jeremy Bicha <jbicha@ubuntu.com> Fri, 03 Jun 2022 09:23:28 -0400
-- Jeremy Bicha <jbicha@ubuntu.com> Wed, 13 Jul 2022 17:52:33 +0200
gnome-shell-extensions (42.1-1) unstable; urgency=medium
gnome-shell-extensions (42.1-0ubuntu1) jammy; urgency=medium
* New upstream release (LP: #1972365)

11
debian/control vendored
View File

@@ -5,16 +5,19 @@
Source: gnome-shell-extensions
Section: gnome
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: Iain Lane <laney@debian.org>, Jeremy Bicha <jbicha@debian.org>, Laurent Bigonville <bigon@debian.org>
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: Iain Lane <laney@debian.org>, Jeremy Bicha <jbicha@ubuntu.com>, Laurent Bigonville <bigon@debian.org>
Build-Depends: debhelper-compat (= 13),
dh-sequence-gnome (>= 0.22),
meson (>= 0.53.0),
sassc
Rules-Requires-Root: no
Standards-Version: 4.6.0
Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions
Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git
XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions
XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git
Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions/tree/ubuntu/jammy
Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git -b ubuntu/jammy
Homepage: https://wiki.gnome.org/Projects/GnomeShell/Extensions
Package: gnome-shell-extensions

9
debian/control.in vendored
View File

@@ -1,7 +1,8 @@
Source: gnome-shell-extensions
Section: gnome
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: @GNOME_TEAM@
Build-Depends: debhelper-compat (= 13),
dh-sequence-gnome (>= 0.22),
@@ -9,8 +10,10 @@ Build-Depends: debhelper-compat (= 13),
sassc
Rules-Requires-Root: no
Standards-Version: 4.6.0
Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions
Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git
XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions
XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git
Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-shell-extensions/tree/ubuntu/jammy
Vcs-Git: https://salsa.debian.org/gnome-team/gnome-shell-extensions.git -b ubuntu/jammy
Homepage: https://wiki.gnome.org/Projects/GnomeShell/Extensions
Package: gnome-shell-extensions

3
debian/gbp.conf vendored
View File

@@ -1,6 +1,7 @@
[DEFAULT]
pristine-tar = True
debian-branch = debian/master
debian-branch = ubuntu/jammy
debian-tag = ubuntu/%(version)s
upstream-branch = upstream/latest
[buildpackage]

View File

@@ -101,10 +101,6 @@ function cycleScreenshotSizes(display, window, binding) {
for (let i = 0; i < scaledSizes.length; i++) {
let [width, height] = scaledSizes[i];
// ignore sizes bigger than the workArea
if (width > workArea.width || height > workArea.height)
continue;
// get the best initial window size
let error = Math.abs(width - outerRect.width) + Math.abs(height - outerRect.height);
if (nearestIndex === undefined || error < nearestError) {
@@ -125,8 +121,18 @@ function cycleScreenshotSizes(display, window, binding) {
if (newY + newHeight > workArea.y + workArea.height)
newY = Math.max(workArea.y + workArea.height - newHeight);
const id = window.connect('size-changed', () => {
window.disconnect(id);
_notifySizeChange(window);
});
window.move_resize_frame(true, newX, newY, newWidth, newHeight);
}
/**
* @param {Meta.Window} window - the window whose size changed
*/
function _notifySizeChange(window) {
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
let newOuterRect = window.get_frame_rect();
let message = '%d×%d'.format(
newOuterRect.width / scaleFactor,

View File

@@ -246,6 +246,48 @@ class BaseButton extends St.Button {
this._updateVisibility();
}
_setLongPressTimeout() {
if (this._longPressTimeoutId)
return;
const { longPressDuration } = Clutter.Settings.get_default();
this._longPressTimeoutId =
GLib.timeout_add(GLib.PRIORITY_DEFAULT, longPressDuration, () => {
delete this._longPressTimeoutId;
if (this._canOpenPopupMenu() && !this._contextMenu.isOpen)
this._openMenu(this._contextMenu);
return GLib.SOURCE_REMOVE;
});
}
_removeLongPressTimeout() {
if (!this._longPressTimeoutId)
return;
GLib.source_remove(this._longPressTimeoutId);
delete this._longPressTimeoutId;
}
vfunc_button_press_event(buttonEvent) {
if (buttonEvent.button === 1)
this._setLongPressTimeout();
return super.vfunc_button_press_event(buttonEvent);
}
vfunc_button_release_event(buttonEvent) {
this._removeLongPressTimeout();
return super.vfunc_button_release_event(buttonEvent);
}
vfunc_touch_event(touchEvent) {
if (touchEvent.type === Clutter.EventType.TOUCH_BEGIN)
this._setLongPressTimeout();
else if (touchEvent.type === Clutter.EventType.TOUCH_END)
this._removeLongPressTimeout();
return super.vfunc_touch_event(touchEvent);
}
activate() {
if (this.active)
return;
@@ -391,7 +433,7 @@ class WindowButton extends BaseButton {
return;
}
if (button === 1)
if (!button || button === 1)
this._minimizeOrActivateWindow(this.metaWindow);
else
this._openMenu(this._contextMenu);
@@ -637,7 +679,7 @@ class AppButton extends BaseButton {
if (contextMenuWasOpen)
this._contextMenu.close();
if (button === 1) {
if (!button || button === 1) {
if (menuWasOpen)
return;

View File

@@ -1,5 +1,5 @@
project('gnome-shell-extensions',
version: '42.2',
version: '42.3',
meson_version: '>= 0.53.0',
license: 'GPL2+'
)