Compare commits

...

24 Commits

Author SHA1 Message Date
2a36bf52cb Bump version to 3.30.2
Update NEWS.
2018-11-13 23:43:15 +01:00
3dffdab1ad workspace: Confine caption width to workspace area
When we started to only show a single caption at a time, we allowed
title captions to be wider than their corresponding window preview.
But while overlapping neighboring previews is fine, we shouldn't
allow the captions to leak outside the workspace area itself and
overlap unrelated elements like workspace switcher or dash.

This partly reverts commit b3b30f239d.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/214


(cherry picked from commit 6099e92df5)
2018-11-13 18:19:22 +00:00
fd75921f13 notificationDaemon: support file:// or icon theme names for image-path
While this sounds counter-intuitive, the image-path hint value might also
be used with URIs or icon names.

As per freedesktop standard:
  The "app_icon" parameter and "image-path" hint should be either an URI
  (file:// is the only URI schema supported right now) or a name in a
  freedesktop.org-compliant icon theme (not a GTK+ stock ID).

Thus the image-path hint should also be parsed as it happens for the
app_icon.

Reuse same logic, by falling back on _iconForNotificationData with the
hint value.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/285


(cherry picked from commit 33b8537bf5)
2018-11-13 15:27:16 +00:00
9b9599515a windowManager: make TouchpadWorkspaceSwitchAction respect natural-scroll
Instead of defaulting to a natural scroll behavior,
have the workspace switch action use the natural-scroll setting
in org.gnome.peripherals.touchpad to determine the correct
direction of travel when swiping. 4 finger swipes will then
match the behavior of the rest of the UI.

Reference: https://gitlab.gnome.org/GNOME/gnome-shell/issues/516


(cherry picked from commit 118cab1766)
2018-11-13 15:26:48 +00:00
609c81698e StTextureCache: use right event to detect file changes
StTextureCache installs file monitors that invalidate caches when
contents of the underlying file change.
At the moment, the cache uses the Gio.FileMonitorEvent.CHANGED event
type to make that determination.

However, that is suboptimal for at least two reasons:
- while a file is being written to disk, many CHANGED events will be
  emitted in sequence. That will cause needless cache invalidations,
  and we will risk loading the file before it's fully loaded.
- if an existing file is replaced, e.g. with g_file_replace(), we may
  not get a CHANGED event but a CREATED one instead, so the cache ends
  up never getting invalidated.

The good news is that in both of those cases GFileMonitor will send a
CHANGES_DONE_HINT event after changes have settled, or after the file
is replaced.

This commit fixes both cases by switching from the CHANGED event to
CHANGES_DONE_HINT to determine that a file has in fact changed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/286


(cherry picked from commit ca3f4cfb41)
2018-11-10 01:09:01 +00:00
62c2dbbc9d messageTray: Disable unredirection while showing banners
We don't usually show notification banners while the monitor is in
fullscreen, but when we do - the notification is urgent - we should
actually show the banner, even if the top-most window is unredirected.
To achieve that, disable unredirection while the banner is showing.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/430


(cherry picked from commit 4dc2039859)
2018-11-08 12:56:42 +00:00
a1a7ba7cc7 workspaces: Use correct schema for workspace settings
The custom overrides system is gone, we need to use the original
mutter schema.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/768


(cherry picked from commit f1195ecb01)
2018-11-08 12:44:33 +00:00
be35dec71e Update Spanish translation 2018-11-06 11:05:06 +00:00
e55bdb0fbb Update Brazilian Portuguese translation 2018-11-05 19:58:30 +00:00
bacdd1c12d iconGrid: Keep icons reactive during pulse animation
The `reactive` property of icon actors was being restored multiple times
over the course of the pulse animation, all at slightly different times
as each icon finished animating at different times.

The problem is that toggling `reactive` on an `StWidget` incurs a style
change of the `insensitive` pseudo class, and style changes would quickly
queue relayouts incurring full stage reallocation. This occurred many times
during a pulse animation, limiting its smoothness and performance.

The solution is to not toggle the `reactive` property in the pulse
animation at all, which avoids incurring multiple full stage relayouts.

As a bonus, this means the icon under the cursor pulses with the correct
selection highlight, appearing more seamless and responsive.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/261


(cherry picked from commit 1acdff822a)
2018-10-30 19:32:28 +00:00
78f6a409aa iconGrid: Defer and group animation cleanup
The `reactive` property of icon actors was being restored 24 times over
the course of the spring animation, all at slightly different times as
each icon finished animating at different times.

The problem is that toggling `reactive` on an `StWidget` incurs a style
change of the `insensitive` pseudo class, and style changes would quickly
queue relayouts incurring full stage reallocation. This occurred many times
during a spring animation hogging the CPU and limiting the frame rate.

The solution is defer and batch the cleanup for all icons until after the
last icon has finished animating. This way the CPU impact of the style
change and stage relayout isn't felt during the animation so the frame
rate remains higher and smoother. The overall CPU usage of the animation
is also reduced as the remaining relayouts are much more likely to be
grouped into a single frame.

Icon spring animation performance on an i7-7700:
Before: 83% CPU and 47 FPS
After : 78% CPU and 54 FPS
which is about a 22% increase in performance per clock (FPS/CPU).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/253


(cherry picked from commit a5e6dd52d2)
2018-10-30 18:09:04 +00:00
d7ee164f0f Update Malayalam translation 2018-10-28 14:06:12 +00:00
0820b9cbef Update Croatian translation 2018-10-24 19:25:32 +00:00
89a720c050 Update Slovak translation 2018-10-24 06:26:23 +00:00
d2393395ff build: Include params.js in portal-helper gresources
Fix a regression causing the portal helper to crash.
In 94423151b2 we moved the dbus interface
descriptions into seperate files which is why we had to include the
fileUtils js module. This module imports the params js module, so add
params.js to the gresources file for the portal helper.


(cherry picked from commit ceed3e07e4)
2018-10-23 15:41:58 +00:00
d21b276c07 panel: Also ignore hidden windows for proximity
We currently only ignore minimized windows, not windows that are
hidden for other reasons - namely on wayland windows are initially
hidden until they are placed.

This fixes a flicker in the transparent top bar on wayland when the
"position" of an unplaced window wrongly suggests the window is
overlapping the top bar.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/693


(cherry picked from commit a0dc8dc7ef)
2018-10-23 15:32:13 +00:00
ccc5967382 keyboardManager: Avoid idempotent calls to meta_backend_set_keymap()
But still try to apply the keymap whenever the input sources changed. This
is a different approach to gnome-shell#240 that still avoid redundant
changes to the current keymap, but actually trigger one when input sources
are added.

https://bugzilla.redhat.com/show_bug.cgi?id=1637418

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/691


(cherry picked from commit b405ed6442)
2018-10-23 09:47:46 +00:00
5ee0f743de osdWindow: Disconnect signals on destroy
Since we started to show OSD windows on all monitors, OSD windows are
destroyed when the corresponding monitor is disconnected. We shouldn't
leave any signal handlers around in that case - they prevent the object
from being garbage collected, and trigger warnings for accessing proper-
ties of invalidated GObjects.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/602


(cherry picked from commit 8566ec2ee5)
2018-10-22 18:10:15 +00:00
ec5db74101 osdWindow: Ensure we setMaxLevel before setting Level itself
When maxLevel is > 100%, first OSD appearance was capping the current
level to 100%. Consecutives key press were then OK.
Ensure we setMaxLevel before setting Level itself, so that correct cap
value is applied.


(cherry picked from commit ae7dd5e2db)
2018-10-19 14:24:22 +00:00
24d8066197 Update Italian translation 2018-10-19 07:21:01 +00:00
c77c47cf29 Update Esperanto translation 2018-10-16 21:01:38 +00:00
620bd037d2 Update Latvian translation 2018-10-14 16:44:37 +00:00
54f8232a93 appFolder: Don't block all shortcuts
App folder popups take a grab when opened, and as we don't pass any
particular pushModal() parameters, all keybindings are blocked. While
this makes sense for most keybindings that would interfere with the
popup interaction, others like volume/brightness keys or screenshots
can be allowed safely.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/648


(cherry picked from commit 76117fd306)
2018-10-13 12:30:37 +00:00
c17ba90209 popupMenu: Handle keypress if numlock is enabled
Add exception to handle a keypress if numlock is enabled as we already do for
capslock. This uses Clutter.ModifierType.MOD2_MASK because at the moment there
is not a more explicit way to refer to the numlock mask.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/550


(cherry picked from commit 8855622666)
2018-10-11 07:46:53 +00:00
24 changed files with 4367 additions and 3185 deletions

21
NEWS
View File

@ -1,3 +1,24 @@
3.30.2
======
* popupMenu: Fix keyboard activation when numlock is active [Andrea; #550]
* Do not block all shortcuts while app folders are expanded [Florian; #648]
* Fix regression in handling new input sources [Carlos; #691]
* Improve performance of app icon animations [Daniel; !253, !261]
* Respect natural-scroll setting for workspace swipe gesture [Erik; #516]
* notifications: Support icon theme names in 'image-path' hint [Marco; !285]
* Confine window preview titles to workspace area [Florian; !214]
* Misc. bug fixes [Florian, Cosimo; #602, #693, #768, #430, !286]
Contributors:
Andrea Azzarone, Cosimo Cecchi, Erik Duxstad, Carlos Garnacho,
Florian Müllner, Didier Roche, Marco Trevisan (Treviño), verdre,
Daniel van Vugt
Translators:
Rūdolfs Mazurs [lv], Kristjan SCHMIDT [eo], Milo Casagrande [it],
Dušan Kazik [sk], gogo [hr], Anish Sheela [ml], Rafael Fontenelle [pt_BR],
Daniel Mustieles [es]
3.30.1
======
* Cancel search on overview hiding [Marco; !205]

View File

@ -52,11 +52,20 @@ var KeyboardManager = new Lang.Class({
this._current = null;
this._localeLayoutInfo = this._getLocaleLayout();
this._layoutInfos = {};
this._currentKeymap = null;
},
_applyLayoutGroup(group) {
let options = this._buildOptionsString();
let [layouts, variants] = this._buildGroupStrings(group);
if (this._currentKeymap &&
this._currentKeymap.layouts == layouts &&
this._currentKeymap.variants == variants &&
this._currentKeymap.options == options)
return;
this._currentKeymap = {layouts, variants, options};
Meta.get_backend().set_keymap(layouts, variants, options);
},
@ -89,8 +98,6 @@ var KeyboardManager = new Lang.Class({
},
setUserLayouts(ids) {
let currentId = this._current ? this._current.id : null;
let currentGroupIndex = this._current ? this._current.groupIndex : null;
this._current = null;
this._layoutInfos = {};
@ -117,9 +124,6 @@ var KeyboardManager = new Lang.Class({
info.group = group;
info.groupIndex = groupIndex;
if (currentId == id && currentGroupIndex == groupIndex)
this._current = info;
i += 1;
}
},

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell">
<file>portalHelper/main.js</file>
<file>misc/config.js</file>
<file>misc/fileUtils.js</file>
<file>portalHelper/main.js</file>
<file>misc/params.js</file>
</gresource>
</gresources>

View File

@ -1462,7 +1462,9 @@ var AppFolderPopup = new Lang.Class({
global.focus_manager.add_group(this.actor);
source.actor.connect('destroy', () => { this.actor.destroy(); });
this._grabHelper = new GrabHelper.GrabHelper(this.actor);
this._grabHelper = new GrabHelper.GrabHelper(this.actor, {
actionMode: Shell.ActionMode.POPUP
});
this._grabHelper.addActor(Main.layoutManager.overviewGroup);
this.actor.connect('key-press-event', this._onKeyPress.bind(this));
},

View File

@ -418,6 +418,11 @@ var IconGrid = new Lang.Class({
},
_animationDone() {
this._clonesAnimating.forEach(clone => {
clone.source.reactive = true;
clone.source.opacity = 255;
clone.destroy();
});
this._clonesAnimating = [];
this.emit('animation-done');
},
@ -443,7 +448,6 @@ var IconGrid = new Lang.Class({
for (let index = 0; index < actors.length; index++) {
let actor = actors[index];
actor.reactive = false;
actor.set_scale(0, 0);
actor.set_pivot_point(0.5, 0.5);
@ -465,7 +469,6 @@ var IconGrid = new Lang.Class({
onComplete: () => {
if (isLastItem)
this._animationDone();
actor.reactive = true;
}
});
}
@ -538,10 +541,6 @@ var IconGrid = new Lang.Class({
onComplete: () => {
if (isLastItem)
this._animationDone();
actor.opacity = 255;
actor.reactive = true;
actorClone.destroy();
}};
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
transition: 'easeInOutQuad',
@ -562,12 +561,8 @@ var IconGrid = new Lang.Class({
scale_x: scaleX,
scale_y: scaleY,
onComplete: () => {
if (isLastItem) {
if (isLastItem)
this._animationDone();
this._restoreItemsOpacity();
}
actor.reactive = true;
actorClone.destroy();
}};
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
transition: 'easeInOutQuad',
@ -581,12 +576,6 @@ var IconGrid = new Lang.Class({
}
},
_restoreItemsOpacity() {
for (let index = 0; index < this._items.length; index++) {
this._items[index].actor.opacity = 255;
}
},
_getAllocatedChildSizeAndSpacing(child) {
let [,, natWidth, natHeight] = child.get_preferred_size();
let width = Math.min(this._getHItemSize(), natWidth);

View File

@ -1309,8 +1309,10 @@ var MessageTray = new Lang.Class({
}
this._banner = this._notification.createBanner();
this._bannerClickedId = this._banner.connect('done-displaying',
this._escapeTray.bind(this));
this._bannerClickedId = this._banner.connect('done-displaying', () => {
Meta.enable_unredirect_for_display(global.display);
this._escapeTray();
});
this._bannerUnfocusedId = this._banner.connect('unfocused', () => {
this._updateState();
});
@ -1322,6 +1324,7 @@ var MessageTray = new Lang.Class({
this._bannerBin.y = -this._banner.actor.height;
this.actor.show();
Meta.disable_unredirect_for_display(global.display);
this._updateShowingNotification();
let [x, y, mods] = global.get_pointer();

View File

@ -77,10 +77,8 @@ var FdoNotificationDaemon = new Lang.Class({
bitsPerSample, nChannels, data] = hints['image-data'];
return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
bitsPerSample, width, height, rowStride);
} else if (hints['image-path']) {
return new Gio.FileIcon({ file: Gio.File.new_for_path(hints['image-path']) });
}
return null;
return this._iconForNotificationData(hints['image-path']);
},
_fallbackIconForNotificationData(hints) {

View File

@ -118,15 +118,30 @@ var OsdWindow = new Lang.Class({
this._hideTimeoutId = 0;
this._reset();
Main.layoutManager.connect('monitors-changed',
this._relayout.bind(this));
this.actor.connect('destroy', this._onDestroy.bind(this));
this._monitorsChangedId =
Main.layoutManager.connect('monitors-changed',
this._relayout.bind(this));
let themeContext = St.ThemeContext.get_for_stage(global.stage);
themeContext.connect('notify::scale-factor',
this._relayout.bind(this));
this._scaleChangedId =
themeContext.connect('notify::scale-factor',
this._relayout.bind(this));
this._relayout();
Main.uiGroup.add_child(this.actor);
},
_onDestroy() {
if (this._monitorsChangedId)
Main.layoutManager.disconnect(this._monitorsChangedId);
this._monitorsChangedId = 0;
let themeContext = St.ThemeContext.get_for_stage(global.stage);
if (this._scaleChangedId)
themeContext.disconnect(this._scaleChangedId);
this._scaleChangedId = 0;
},
setIcon(icon) {
this._icon.gicon = icon;
},
@ -204,8 +219,8 @@ var OsdWindow = new Lang.Class({
_reset() {
this.actor.hide();
this.setLabel(null);
this.setLevel(null);
this.setMaxLevel(null);
this.setLevel(null);
},
_relayout() {
@ -253,8 +268,8 @@ var OsdWindowManager = new Lang.Class({
_showOsdWindow(monitorIndex, icon, label, level, maxLevel) {
this._osdWindows[monitorIndex].setIcon(icon);
this._osdWindows[monitorIndex].setLabel(label);
this._osdWindows[monitorIndex].setLevel(level);
this._osdWindows[monitorIndex].setMaxLevel(maxLevel);
this._osdWindows[monitorIndex].setLevel(level);
this._osdWindows[monitorIndex].show();
},

View File

@ -1093,6 +1093,7 @@ var Panel = new Lang.Class({
let windows = activeWorkspace.list_windows().filter(metaWindow => {
return metaWindow.is_on_primary_monitor() &&
metaWindow.showing_on_its_workspace() &&
!metaWindow.is_hidden() &&
metaWindow.get_window_type() != Meta.WindowType.DESKTOP;
});

View File

@ -143,9 +143,10 @@ var PopupBaseMenuItem = new Lang.Class({
_onKeyPressEvent(actor, event) {
let state = event.get_state();
// if user has a modifier down (except capslock)
// if user has a modifier down (except capslock and numlock)
// then don't handle the key press here
state &= ~Clutter.ModifierType.LOCK_MASK;
state &= ~Clutter.ModifierType.MOD2_MASK;
state &= Clutter.ModifierType.MODIFIER_MASK;
if (state)

View File

@ -478,6 +478,7 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
this._dx = 0;
this._dy = 0;
actor.connect('captured-event', this._handleEvent.bind(this));
this._touchpadSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.peripherals.touchpad'});
},
_checkActivated() {
@ -515,7 +516,11 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
// Scale deltas up a bit to make it feel snappier
this._dx += dx * 2;
this._dy += dy * 2;
if(!(this._touchpadSettings.get_boolean('natural-scroll')))
this._dy -= dy * 2;
else
this._dy += dy * 2;
this.emit('motion', this._dx, this._dy);
} else {
if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && ! this._checkActivated()) ||

View File

@ -465,6 +465,8 @@ var WindowOverlay = new Lang.Class({
title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
windowClone.actor.label_actor = title;
this._maxTitleWidth = -1;
this._updateCaptionId = metaWindow.connect('notify::title', w => {
this.title.text = w.title;
this.title.text = this._getCaption();
@ -528,6 +530,13 @@ var WindowOverlay = new Lang.Class({
Math.max(this.borderSize, this.closeButton.width - this.closeButton._overlap)];
},
setMaxChromeWidth(max) {
if (this._maxTitleWidth == max)
return;
this._maxTitleWidth = max;
},
relayout(animate) {
let button = this.closeButton;
let title = this.title;
@ -554,13 +563,26 @@ var WindowOverlay = new Lang.Class({
else
button.set_position(Math.floor(buttonX), Math.floor(buttonY));
let titleX = cloneX + (cloneWidth - title.width) / 2;
// Clutter.Actor.get_preferred_width() will return the fixed width if
// one is set, so we need to reset the width by calling set_width(-1),
// to forward the call down to StLabel.
// We also need to save and restore the current width, otherwise the
// animation starts from the wrong point.
let prevTitleWidth = title.width;
title.set_width(-1);
let [titleMinWidth, titleNatWidth] = title.get_preferred_width(-1);
let titleWidth = Math.max(titleMinWidth,
Math.min(titleNatWidth, this._maxTitleWidth));
title.width = prevTitleWidth;
let titleX = cloneX + (cloneWidth - titleWidth) / 2;
let titleY = cloneY + cloneHeight - (title.height - this.borderSize) / 2;
if (animate) {
this._animateOverlayActor(title, Math.floor(titleX), Math.floor(titleY), title.width);
this._animateOverlayActor(title, Math.floor(titleX), Math.floor(titleY), titleWidth);
} else {
title.width = title.width;
title.width = titleWidth;
title.set_position(Math.floor(titleX), Math.floor(titleY));
}
@ -1306,6 +1328,12 @@ var Workspace = new Lang.Class({
let cloneHeight = clone.actor.height * scale;
clone.slot = [x, y, cloneWidth, cloneHeight];
let cloneCenter = x + cloneWidth / 2;
let maxChromeWidth = 2 * Math.min(
cloneCenter - area.x,
area.x + area.width - cloneCenter);
overlay.setMaxChromeWidth(Math.round(maxChromeWidth));
if (overlay && (initialPositioning || !clone.positioned))
overlay.hide();

View File

@ -31,7 +31,7 @@ var WORKSPACE_CUT_SIZE = 10;
var WORKSPACE_KEEP_ALIVE_TIME = 100;
var OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
var MUTTER_SCHEMA = 'org.gnome.mutter';
/* A layout manager that requests size only for primary_actor, but then allocates
all using a fixed layout */
@ -674,7 +674,7 @@ var ThumbnailsBox = new Lang.Class({
Main.overview.connect('window-drag-cancelled',
this._onDragCancelled.bind(this));
this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
this._settings.connect('changed::dynamic-workspaces',
this._updateSwitcherVisibility.bind(this));

View File

@ -24,7 +24,7 @@ var AnimationType = {
FADE: 1
};
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
const MUTTER_SCHEMA = 'org.gnome.mutter';
var WorkspacesViewBase = new Lang.Class({
Name: 'WorkspacesViewBase',
@ -473,7 +473,7 @@ var WorkspacesDisplay = new Lang.Class({
this._workspacesViews = [];
this._primaryScrollAdjustment = null;
this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
this._settings.connect('changed::workspaces-only-on-primary',
this._workspacesOnlyOnPrimaryChanged.bind(this));
this._workspacesOnlyOnPrimaryChanged();

View File

@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.30.1',
version: '3.30.2',
meson_version: '>= 0.47.0',
license: 'GPLv2+'
)

1753
po/eo.po

File diff suppressed because it is too large Load Diff

View File

@ -1635,7 +1635,7 @@ msgstr "Desconectado"
#: js/ui/status/bluetooth.js:141
msgid "On"
msgstr "Encender"
msgstr "Encendido"
#: js/ui/status/brightness.js:44
msgid "Brightness"

921
po/hr.po

File diff suppressed because it is too large Load Diff

936
po/it.po

File diff suppressed because it is too large Load Diff

940
po/lv.po

File diff suppressed because it is too large Load Diff

1002
po/ml.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

907
po/sk.po

File diff suppressed because it is too large Load Diff

View File

@ -984,7 +984,7 @@ file_changed_cb (GFileMonitor *monitor,
char *key;
guint file_hash;
if (event_type != G_FILE_MONITOR_EVENT_CHANGED)
if (event_type != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
return;
file_hash = g_file_hash (file);