Commit Graph

5840 Commits

Author SHA1 Message Date
Florian Müllner
d2c75801ea screenshot: Allow bypassing lockdown setting
The setting is only relevant when writing to disk is required. We
will soon expose a screenshot method that doesn't, so make it
possible to ignore it.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/286
2018-07-30 16:55:10 +00:00
Florian Müllner
da537cda43 screenshot: Adopt GIO's async pattern
A custom callback type is more convenient, but only as long as no
other callback type is required. We are about to add functionality
that does not return the filename to a screenshot saved on disk, so
prepare for that by moving to GIO's generic async callback pattern.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/286
2018-07-30 16:55:09 +00:00
Jan-Michael Brummer
304c667bca windowManager: Add top edge drag gesture to unmake fullscreen window
Fullscreen windows cannot be restored by touch device users unless the
application adds support for it.
As it is unlikely to change all application lets introduce a top edge
drag gesture which unmakes fullscreen windows.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/123
2018-07-28 12:11:41 +02:00
Jonas Ådahl
879a81abeb remoteAccess: Make indicator orange
Make the indicator for active remote access use the warning color, to
indicate the severity of allowing remote access.

This only makes the indicator icon orange; the icon in the system menu
is still white.
2018-07-27 18:10:35 +02:00
Marco Trevisan (Treviño)
ce3555382b workspaceThumbnail: Sync clone position changes with actor
We need to update the clone position if window actor (not the meta window)
position changed.

https://bugzilla.gnome.org/show_bug.cgi?id=776588
2018-07-24 11:08:25 +00:00
Marco Trevisan (Treviño)
837a00c3f0 workspace: Recompute bounding box on window 'position-changed'
We need to update the clone position if window size changed
also, rename meta window 'size-changed' callback accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=792681
2018-07-24 11:08:25 +00:00
Jonas Ådahl
0d5bae3844 Add remote access indication and control
Add an indicator for when there is something access the display server
remotely. This could be 1) remote desktop, 2) screen cast or 3) remote
control, but all effectively applications using
org.freedesktop.portal.ScreenCast or org.gnome.portal.RemoteDesktop as
well as gnome-remote-desktop using the corresponding org.gnome.Mutter
APIs directly.

As it is now, it'll simply show a single icon for when anything is
having an active session, and a single action "Turn off" that'll close
every active session.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/160
2018-07-23 14:03:26 +02:00
Florian Müllner
e36ba874a8 Stop using conditional catch statements
It is a mozilla extension that is going away in SpiderMonkey 60.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/151
2018-07-17 17:02:39 +00:00
Iain Lane
22392d1328 loginManager: Get the session ID from logind if XDG_SESSION_ID unset
If we're started by systemd, we won't be in the user's display session.
However, this is still the session that will get locked & unlocked. Ask
logind what the 'display' or 'greeter' session is, and watch for the
Unlock signal for that session to know when to unlock.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/137
2018-07-17 17:44:18 +02:00
Florian Müllner
0dee82fb9f keyboard: Handle no-window case in FocusTracker
For windows, the cursor location needs to be adjusted by the frame
offsets. However we cannot assume that there is a window, as the
shell itself can have the key focus.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/414
2018-07-17 01:44:18 +02:00
Florian Müllner
905801b178 panel: Allow restoring maximized/tiled windows by touch
Maximized and tiled windows can be restored with a drag gesture,
not only from their titlebars, but also from any non-reactive
parts of the top bar above the window. Currently this only works
for actual pointer devices, extend the behavior to handle touch
as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/112
2018-07-14 18:38:16 +00:00
Xavier Johnson
4a7082bb0f switcherPopup: Cancel window cycling with Tab
If the Escape key is used for a window/app cycler/switcher shortcut
(such as "Switch windows directly"), then there is no way to cancel
the switching/cycling operation with the keyboard.

This change allows cancelling such an operation by pressing the Tab
key, but only if Tab is not already being used by the current
switcher/cycler shortcut.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/315
2018-07-14 14:35:05 +00:00
Andrea Azzarone
2e90c5fa4b popupMenu: Don't handle key presses directly if there are modifiers
Key events involved in a keyboard shortcut are not completely consumed by
Mutter. That means that if the popupMenu is bound to a shortcut (e.g.
Alt<Space>) and the user keeps the keys pressed, the same key-event will be
delivered to the popupMenu. We can workaround this issue filtering out all the
events where a a modifier is down (except capslock).

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/372
2018-07-14 14:04:18 +02:00
Florian Müllner
e7f2e92410 events: Re-use event messages where possible
Destroying and recreating the entire events list on every change is not only
wasteful, it also breaks the clear functionality as messages scheduled for
removal are replaced with "new" messages after the first message has been
removed.

Address both issues by keeping track of all messages and re-use them
whenever possible.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/325
2018-07-13 20:13:30 +00:00
Carlos Garnacho
e3ebc8d0c6 keyboard: Remove stale references to global.screen
(Re)introduced by the previous patch.
2018-07-11 18:46:49 +02:00
Carlos Garnacho
fc5ab44704 keyboard: Implement standalone FocusTracker
And stop using FocusCaretTracker for caret position purposes. This
new object uses 1) the text-input protocol in wayland and 2) Info
from IBusPanelService for X11 (which is meant to work for XIM too).

This drops the usage of AtspiEventListener for OSK purposes, which
is best to avoid.
2018-07-11 18:32:32 +02:00
Florian Müllner
d9a1434ae9 workspaceThumbnail: Don't keep stale clones in list
If a clone gets destroyed before the corresponding MetaWindow is
removed from the workspace, we will still find it in the list of
clones and try to destroy it again. Avoid the resulting warnings
by updating the list of clones immediately when a clone is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2018-07-09 13:00:35 +02:00
Florian Müllner
d0bdea3178 workspace: Don't keep stale clones in list
If a clone gets destroyed before the corresponding MetaWindow is
removed from the workspace, we will still find it in the list of
clones and try to destroy it again. Avoid the resulting warnings
by updating the list of clones immediately when a clone is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2018-07-09 13:00:17 +02:00
Marco Trevisan (Treviño)
ccadf6aca1 workspaceThumbnail: remove unused private win reference 2018-07-09 13:00:15 +02:00
Marco Trevisan (Treviño)
266b0e9dd0 keyboard: remove global.screen
This is disabled code for now, but let's have it fixed once we'll use it
2018-07-08 17:43:15 +02:00
Marco Trevisan (Treviño)
f7355f593d closeDialog: use {disable,enable}_unredirect_for_display
Remove leftover global.screen presency
2018-07-08 17:43:15 +02:00
Jonas Ådahl
47ea10b7c9 Remove usage of MetaScreen
Remove any usage of MetaScreen, as it has been removed from libmutter
in the API version 3. The corresponding functionality has been moved
into three different places: MetaDisplay, MetaX11Display (for X11
specific functionality) and MetaWorkspaceManager.

https://bugzilla.gnome.org/show_bug.cgi?id=759538
2018-07-06 19:56:19 +02:00
Jonas Ådahl
2c0376c150 workspaceThumbnail: Initialize signal handler ids to 0
They are used in conditions, so initialize them first.
2018-07-06 19:55:07 +02:00
Marco Trevisan (Treviño)
996dd74157 layoutManager: Return null monitor if focusIndex is invalid
https://bugzilla.gnome.org/show_bug.cgi?id=788882
2018-06-28 17:05:30 +02:00
Marco Trevisan (Treviño)
878946962d windowManager: Don't animate unmanaged windows on (un)minimization 2018-06-28 17:05:30 +02:00
Marco Trevisan (Treviño)
84d2d3feb3 keyboard: Check monitor validity before deferencing it
Monitor could be invalid in headless mode.

https://bugzilla.gnome.org/show_bug.cgi?id=788882
2018-06-28 17:05:30 +02:00
Sam Spilsbury
19e864ed3b keyboard: Handle case where keyboardMonitor is unset
This may be the case where keyboardIndex is -1, which may be the
case where either the keyboard monitor hasn't been set yet, or
the keyboard is being unmanaged and meta_window_get_monitor
returns -1

https://bugzilla.gnome.org/show_bug.cgi?id=788882
2018-06-28 17:05:29 +02:00
Sam Spilsbury
c9bf72c5c4 windowMenu: Check if monitorIndex is valid before using it
Calling meta_window_get_monitor on an unmanaged window may return
-1, so we need to check the return value.

https://bugzilla.gnome.org/show_bug.cgi?id=788882
2018-06-28 16:29:07 +02:00
Florian Müllner
5fe349d5ba thunderbolt: Do not auto start boltd
The service is expected to be activated by systemd when a thunderbolt
device is plugged in, so no need to have it auto-started with the
session.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/54
2018-06-25 14:17:07 +00:00
Joe Rabinoff
8237a1f6e0 Change "const" to "var"
These variables are in fact used from other modules, so gjs complains about them
being const.
2018-06-18 11:19:13 -04:00
Xavier Johnson
a21a22fdb5 appDisplay: Make middle-click like Ctrl+click
When middle-clicking an app icon on the Dash, it will always try to open
a new window of that app, even if the app doesn't support multiple
windows. Meanwhile, Ctrl+click on an app will only open a new window if
the app allows it.

This change prevents middle-clicks on app icons from opening new windows
for apps without multi-window support.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/316
2018-06-07 17:49:36 +00:00
Florian Müllner
b1dd746443 network: Keep key focus in dialog when removing networks
When the actor that has the key focus is destroyed, Clutter moves
the focus to the stage. In case the destroyed actor was inside a
ModalDialog, this breaks any keyboard interaction: keynav is broken
because the stage isn't in any focus chain, and access keys like
Escape because they are handled on the dialog's parent.

The only dialog that may destroy a child without recreating the dialog
buttons (and thus moving the key focus there) is the WirelessDialog,
fix it by keeping the key focus within the dialog when removing networks
from the list.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/76
2018-05-31 11:42:14 +00:00
Florian Müllner
c15e163eb1 network: Handle networks with no access points
This avoids a couple of warnings when encountering such a network.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/76
2018-05-31 11:42:14 +00:00
Florian Müllner
6eed4e31d7 workspace: Fall back to app name in window caption
Just like we did for the window list in app icons' context menu,
provide a fallback for window captions in the window picker rather
than showing blank items to the user.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/26
2018-05-31 11:27:44 +00:00
Florian Müllner
f0557ea05c appDisplay: Fall back to app name in icon menu
The app icon's context menu contains a list of open windows,
identified by their title. As we currently don't handle the
case where the app didn't set a title, we end up with empty
menu items which looks clearly broken. Fall back to the app's
name in that case.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/26
2018-05-31 11:27:43 +00:00
Florian Müllner
b03bcc85aa closeDialog: Periodically check for window to become responsive again
The close dialog for non-responding windows is closed automatically
when we detect that the window is responding again. However as we
currently only ping the window in response to certain user actions
(like focusing the window or opening the window menu), this can
easily go undetected.

Address this by periodically pinging the window while the close
dialog is shown.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/298
2018-05-25 18:23:55 +02:00
Florian Müllner
70057c6a55 closeDialog: Disable unredirection while showing
The dialog won't be visible when unredirection is in place (for example
while a fullscreen window is focused), so disable unredirection while
the dialog is up.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/298
2018-05-25 14:05:29 +00:00
Ole Jørgen Brønner
fdaddbd1e0 Improve notification documentation
Ref: https://gitlab.gnome.org/GNOME/gnome-shell/issues/294
2018-05-22 18:39:19 +02:00
Daniel van Vugt
94101e8bb8 magnifier.js: Fix zoom juddering
Make Zoom respond to the mouse silky-smoothly.

It was previously hard-coded to: 1000/50 = 20 FPS.

https://bugzilla.gnome.org/show_bug.cgi?id=682013
https://launchpad.net/bugs/1691675
2018-05-17 11:42:20 +08:00
Mario Sanchez Prada
d8b9e23502 network: Update the icon in the panel whenever NM's state changes
Similar to what it's done when the main connection changes, we need
to make sure that the icon in the panel gets updated before calling
_syncConnectivity(), so that the icon gets always updated if needed,
regardless of whether there's an active connection or not.

This is needed because there's at least one case when an icon should
be shown when the computer is not connected to any network: when a
hotspot has been enabled, which can be useful even if there's not
an internet connection to share (e.g. to easily allow connecting
other devices to the computer.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/214
2018-05-15 09:15:43 +01:00
Florian Müllner
c0a453f64f networkAgent: Fix fallout from libnm port
While the libnm-glib version of the function returns a GByteArray*
that gjs can directly cast to the required gutf8*, the libnm function
returns GBytes* from which we need to explicitly fetch the data.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/136
2018-05-09 16:19:58 +02:00
Silvère Latchurié
5336175736 osdWindow: Fix blurriness at certain resolutions
The y position wasn't rounded, leading to some blurriness at vertical
resolutions that aren't a multiple of 4 (e.g. 1050).

https://bugzilla.gnome.org/show_bug.cgi?id=782011
2018-05-08 21:04:02 +02:00
Florian Müllner
ffc0eb1de2 remoteSearch: Actually return icons
Since commit 3b1330880f, a remote search result's createIcon() method
no longer returns the created icon, whoops ...

https://gitlab.gnome.org/GNOME/gnome-shell/issues/249
2018-05-03 08:22:58 +00:00
Xiaoguang Wang
594cc7cbef workspaceThumbnails: Avoid access to undefined variables
If thumbnails haven't been created, they don't need to be destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=787871
2018-05-02 20:04:42 +02:00
Yussuf Khalil
581b38ecf4 scripting: Fix argument list of createTestWindow()
Commit f285f2c6 changed Scripting.createTestWindow() to accept a parameter
object instead of a parameter list but forgot to remove the width and height
arguments. This breaks the "core" test as all windows are created with default
settings.
2018-04-25 23:47:06 +02:00
Lubomir Rintel
c82cb918ae network: initialize the agent asynchronously
This also bumps the NM requirement. We actually already use API from
1.0, but regularly hit various NetworkManager bugs with versions prior
to 1.10.2. 1.10.4 fixes the asynchronous agent initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=789811
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/63
2018-04-23 10:45:20 +02:00
Florian Müllner
0327069e83 polkitAgent: Guard against repeated close() calls
We use the close() method to disconnect signal handlers set up in
init(), however the handler ID is only valid in the first call in
case the method is called more than once.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/221
2018-04-21 18:42:15 +02:00
Christian Kellner
fb509dfc25 thunderbolt: sync D-Bus API with bolt changes
bolt 0.3 deprecated all AUTHORIZED_XXX status flags, but added
a CONNECTING one. Also AuthFlags got renamed to AuthCtrl.
2018-04-20 11:36:37 +02:00
Christian Kellner
874a91968f thunderbolt: remove gdbus error prefix, if present
If we get an error during device enrollment, the message might be
prefixed to indicate that the error came from the remote peer. We
are presenting that message to the user so strip that prefix away
if it was there.
2018-04-20 11:36:37 +02:00
Christian Kellner
0963ccddba thunderbolt: fix enroll-failed signal args order
The devices emitted (device, error) while the connected handler
was expecting (error, device). The former is more consistent
with the rest of the code (so change it to device, error).
2018-04-20 11:27:11 +02:00
Takao Fujiwara
35fced27df ibusCandidatePopup: Fix candidate-clicked signal 2018-04-18 13:37:53 +09:00
Didier Roche
d6d09fd3c8 ui: Theme lookup should respect XDG_DATA_DIRS
Modes, extensions and other GNOME Shell assets are searched in appropriate
subdirectories of each directory in XDG_DATA_DIRS, falling back
to global.datadir.
However, this isn't the case for themes, which are currently always expected
in global.datadir, even when referenced by a mode in a different XDG_DATA_DIR.

The fix is to have the theme finding pattern follow the same logic as other
elements.
Fixes #167.
2018-04-16 19:09:14 +02:00
Mario Sanchez Prada
cdbc99e992 popupMenu: Fix wrong call to clutter_actor_add_child()
Specify the horizontal alignment via the x_align property when creating
the StIcon, since this function expects one argument, not two.
2018-04-16 11:40:04 +00:00
Florian Müllner
69afe7785d remoteMenu: Support icons in app-menu
The HIG discourages the use of icons in menus except for "noun" items
(files, bookmarks, ...). While those should be rarely used in the
application menu, it still makes sense to support them in the few
cases where they are used.

https://bugzilla.gnome.org/show_bug.cgi?id=760985
2018-04-14 09:02:20 +00:00
Marco Trevisan (Treviño)
b99e304f1e workspaceThumbnail: initialize porthole based on workArea
https://bugzilla.gnome.org/show_bug.cgi?id=792687
2018-04-13 16:59:51 -05:00
Marco Trevisan (Treviño)
c29bd46e7a workspaceThumbnail: rebuild thumbnails if workareas size changed
https://bugzilla.gnome.org/show_bug.cgi?id=792687
2018-04-13 16:58:28 -05:00
Marco Trevisan (Treviño)
5fcf40b973 workspaceThumbnail: only update _porthole if the overview is visible
Otherwise it happens that porthole is computed again after that the
overlay is hidden (triggered by a layout reallocation) and thus not
regenerated again afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=792687
2018-04-13 16:53:18 -05:00
Piotr Drąg
a198dfe3d8 thunderbolt: capitalize Thunderbolt in a translatable string 2018-04-13 21:52:32 +02:00
Florian Müllner
cb4252e888 polkitAgent: Hide authentication dialogs while locked
Since commit 78a92fb6be we no longer pop up authentication dialogs
on the lock screen, however any dialog that is already open at that
time remains open. This is unexpected, so hide the dialog until
the screen is unlocked again.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/166
2018-04-13 19:35:31 +02:00
Florian Müllner
09d3cdb023 workspace: Don't move focus unconditionally
Since commit 1939e22c22, we move the keyboard focus with the hover
highlight. However while this makes sense when interacting with
the window picker, it interferes with keyboard navigation of other
components like dash or top bar. Address this by only moving the
focus when the previous focus was already inside the window picker
or unset.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/50
2018-04-13 14:13:35 +00:00
Florian Müllner
71515a8a11 networkAgent: Use libnm for plugin loading
After the networking code has been ported to libnm, we can use its
API for loading VPN plugins instead of rolling our own ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/39
2018-04-13 14:04:55 +00:00
Florian Müllner
11ca8dd54f worldClock: Handle named timezones
The original UTC support in GWeather piggy-backed on the existing API, but
as "country" or "city" don't make sense in the context of UTC or AoE, the
concept of "named timezones" was introduced. Handle those explicitly to get
back labels for those locations.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/150
2018-04-13 09:15:48 +00:00
Florian Müllner
e00f22ebe6 overview: Use monotonic time to check for consecutive activations
We don't toggle the overview if the request happens too close to the
last activation, to filter out double-clicks or activation by both
the hot corner and a click. However as the check is based on the
real time, the check breaks if the system clock moves backwards and
the last activations appears to be in the future. Fix this by using
monotonic time which is guaranteed to only move forward.

https://bugzilla.gnome.org/show_bug.cgi?id=763886
2018-04-13 09:13:45 +00:00
Bastien Nocera
9f7b101437 appFavorites: Add evolution to rename list
Evolution 3.28 changed the desktop filename. Without this patch,
evolution will disappear from the dock.
2018-04-10 14:38:26 +00:00
Florian Müllner
78a92fb6be polkitAgent: Queue authentication requests while locked
While polkit requests *should* be the result of a user action, that's
not always the case in practice and authentication dialogs can pop up
out of nowhere at any time. That's always annoying, but particularly
bad on the lock screen. If we disabled the polkit component altogether,
the fallback GTK-based agent would kick in, so instead handle the case
explicitly and postpone showing the dialog until the session is unlocked.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/179
2018-04-06 20:08:29 +02:00
Jeremy Bicha
01509cf1a5 appFavorites: Rename gnome-tweaks.desktop 2018-04-05 22:06:15 -04:00
Florian Müllner
526834e39b modalDialog: Remove some unused code
No need to figure out an x_alignment variable that hasn't been used
since commit 0722c06275 ...
2018-03-21 16:48:56 +00:00
Carlos Garnacho
bfdbee8115 shellEntry: Use correct enum for input purpose hints
This was mistakenly left using the GTK+ counterparts. Luckily the enums
are binary compatible, but oops.
2018-03-14 13:30:47 +00:00
Christian Kellner
190a31dd5f thunderbolt: honor boltd's AuthMode property
boltd 0.2 gained a property that indicates if it is authorizing
devices or not. If it indeed is not authorizing then we wont
try to enroll new devices because that would otherwise lead to
and error.
2018-03-05 22:03:28 +01:00
Christian Kellner
cccfc7faca thunderbolt: adapt to bolt 0.2 interface changes
All enums are now strings on the bus. Also the Device.Security
property is gnome. Some new properties got added instead.
2018-03-05 22:03:11 +01:00
Florian Müllner
5e9e4f8c73 viewSelector: Don't mark synth event as in capture phase
When we move keyboard focus to the search entry, we replay the key press
that triggered the move to the entry using ClutterActor's event() method.
Since commit 3b293e91e we specify that the event is in the capture phase
to make it work with StIMText, but now that commit 83accce24 removed it,
we have to return to the expected non-capture flag that matches the orig-
inal event to unbreak find-as-you-type functionality.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/72
2018-03-05 19:12:59 +00:00
Florian Müllner
b28e48094b viewSelector: Don't duplicate find-as-you-type in captured-event
Find-as-you type was never automatically handled by StIMText, but
by the existing stage key-press handler. The functionality broke
for a different reason, we will fix it after reverting the recent
captured-event changes.

This reverts commits bc4462cd0c and e4ee944d8d.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/72
2018-03-05 19:12:58 +00:00
Florian Müllner
81dfcb85ca messageList: Fix invisible close buttons still working
Since commit c4f2bb5f, close buttons are hidden by making them fully
transparent rather than setting their visibility to false to keep
the overall message layout stable. As a result, the buttons now work
even when invisible, which is clearly unexpected - fix this by updating
the reactive property appropriately.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/66
2018-03-02 19:59:48 +00:00
Florian Müllner
3b1330880f cleanup: Use Function.prototype.bind()
When not using arrow notation with anonymous functions, we use Lang.bind()
to bind `this` to named callbacks. However since ES5, this functionality
is already provided by Function.prototype.bind() - in fact, Lang.bind()
itself uses it when no extra arguments are specified. Just use the built-in
function directly where possible, and use arrow notation in the few places
where we pass additional arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:02 +00:00
Florian Müllner
213e38c2ef cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:00 +00:00
Florian Müllner
76f09b1e49 cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace
it for better readability and to prepare for an eventual port to
ES6 classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:54:58 +00:00
Florian Müllner
2bce1f1510 keyboard: Fix a warning
imports.misc.ibusManager.IBus is declared as const, so referencing it
from another module triggers a warning with recent mozjs. As of commit
083d11a032 IBus is mandatory, so just make it a regular import to avoid
the warning.
2018-02-21 13:19:15 +01:00
Carlos Garnacho
630c70f13c keyboard: Set 'latched' pseudo-class on latched shift key
This is pseudo-class is added on .shift-key-uppercase whenever the shift
state is latched, a matching selector would be:
.keyboard-key.shift-key-uppercase:latched {}

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:48 +01:00
Carlos Garnacho
ebb39bcbe2 keyboard: Delegate enter/shift/layout/hide buttons style to theming
Drop the UTF8 glyphs from those, and add style classes so those can be
specifically themed and given a background image. The style classes are:
.keyboard-key.enter-key{}
.keyboard-key.shift-key-lowercase{} /* applies while lowercase */
.keyboard-key.shift-key-uppercase{} /* applies while uppercase */
.keyboard-key.layout-key{}
.keyboard-key.hide-key{}

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:45 +01:00
Carlos Garnacho
9cf2ec8bd2 keyboard: Avoid using key.label for anything else than presentation
Do the finicky checks to adjust key widths and whatnot based on other
values than the label. This makes the label exclusively used for
presentation (i.e. setting up a St.Label).

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:41 +01:00
Carlos Garnacho
5f6745cad0 keyboard: Shift key shouldn't latch the state unless long pressed
Instead of latching all states, make shift unlatched by default, and only
latched when making a long press on the key. When not latched, the keyboard
will switch to the first level (alphabetic lowercase) after the first key
press.

Also, move the actual level switch to Key::pressed, so it feels more
reactive on long press.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:36 +01:00
Carlos Garnacho
d8fd7b5a44 keyboard: Implement Key object 'long-press' signal
This signal may be emitted on any key, regardless of extended keys, so
make the timeout useful for both situations.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:32 +01:00
Carlos Garnacho
f8abe073eb keyboard: Remove needless function
It boils down to another function call, and has a single caller. Just let
the caller make _setActiveLayer() directly.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:29 +01:00
Carlos Garnacho
0608413b96 keyboard: Do key presses on actual key press
It was mistakenly connecting twice to the 'released' signal. Also, move
level changes to key release, since it will be more convenient to hook
latched states on long press.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
2018-02-15 19:36:03 +01:00
Carlos Garnacho
7f8a1ec1fb keyboard: make Key objects' topmost actor to be this.actor
These objects created this.actor being the St.Button, and a surrounding
this.container actor that is the actual actor callers care about. Turn this
around and make this.actor be the parent-less actor, and this.keyButton the
contained internal button. This is more consistent with gnome-shell style.
2018-02-12 17:00:51 +01:00
Carlos Garnacho
e859fc8f16 keyboard: Do not call non-existent function
Commit 8fdf47ea5b removed _addKeys(), but forgot one caller. We just want
to regenerate the keyboard for the current group, so call into the
_onGroupChanged function.
2018-02-12 17:00:51 +01:00
Nikita Churaev
92f1aec3dd appDisplay: Fix small app folder icons when using HIDPI
While the scale factor is taken into account for app icons, we set
an explicit size when combining the into a folder icon - unless we
take the factor into account, the result will be too small on HiDPI
displays.

https://bugzilla.gnome.org/show_bug.cgi?id=792259
2018-02-10 00:40:48 +00:00
Carlos Garnacho
bc4462cd0c viewSelector: Avoid stealing focus from other entries into overview entry
The captured-event handler just redirects focus there on the first keypress,
what it doesn't account for is that other entries may be active while the
Activities overview is opened (eg. alt-f2, or other modal dialogs). Play
along with other entries, and make it only steal focus if no other entry
is selected.

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

Closes: #33
2018-02-10 00:03:11 +00:00
Mario Sanchez Prada
d63c0e277c altTab: Add also a shortcut to close windows from the switcher popups
Similar to what has been done for the apps switcher, this allows closing
windows pressing W or F4 while operating the windows switcher popup or
the apps switcher popup while navigating the list of windows for an app.

https://bugzilla.gnome.org/show_bug.cgi?id=620106
2018-02-09 09:26:50 +00:00
Mario Sanchez Prada
06f790d86c switcherPopup: Handle removal of items from SwitcherPopup
This will be mainly useful for closing apps from the applications
switcher, but can be implemented generically enough to select the
nearest existing item after removal if there's any, or destroying
the popup's actor otherwise.

Specifically for the apps switcher, doing this also removes the need
of having to manually either update the current app in AppSwitcher
and highlight it, if there are still any items after the removal, or
simply destroy the AppSwitcher otherwise. Besides, calling _select()
in the handler for item-removed makes sure that the list of thumbnails
in the switcher is always closed, if open, when quitting the app.

https://bugzilla.gnome.org/show_bug.cgi?id=620106
2018-02-09 09:26:50 +00:00
Florian Müllner
a3918d8c38 altTab: Add shortcut to quit application
Allow to quit the currently selected application by hitting Alt-q,
similar to the OS X switcher.

https://bugzilla.gnome.org/show_bug.cgi?id=620106
2018-02-09 09:26:50 +00:00
Florian Müllner
5122b06839 altTab: Update the switcher when apps and/or windows get stopped/closed
Make sure that the items from the applications switcher and the windows
switcher are removed when the related applications get stopped, or some
of the associated windows closed.

https://bugzilla.gnome.org/show_bug.cgi?id=620106
2018-02-09 09:26:49 +00:00
Rafal Luzynski
a647445b95 calendar Preparing for genitive/nominative months
glibc 2.27 introduced new format specifiers for the month names.
It's obligatory to use them in several languages already and it's
encouraged to use them for all languages because it is not destructive
for any language. As more languages are expected to follow this
standard it's better to use the "%OB" format specifier now so it will
start working correctly automatically.
See also: https://sourceware.org/bugzilla/show_bug.cgi?id=10871

This standard has been also working in BSD and OS X since 1990s,
if anyone tries to use gnome-shell in these systems.

Note: This will not work correctly with glibc < 2.27, there is no
detection whether the system is old or new.

https://bugzilla.gnome.org/show_bug.cgi?id=780957
2018-02-08 12:48:31 +01:00
Rafal Luzynski
9dbe10889b calendar: Make month and month-year formats translatable
Don't try to figure out the month-year order from gtk+.
Provide the format for the translators.  This is easier
and more versatile.

https://bugzilla.gnome.org/show_bug.cgi?id=781329
2018-02-08 12:39:00 +01:00
Florian Müllner
d3a3b7f514 screenShield: Do not save lock state on wayland
We keep track of the lock state and restore it on startup to prevent
a crash from bypassing the screen lock. However on wayland, a crash
doesn't result in gnome-session restarting gnome-shell, but brings
down the entire session - that is, restoring the lock state does not
actually protect the existing session in that case, but forces the
user to authenticate twice in order to start the next session. This
is clearly not helpful, so avoid this by not saving the state when
running as wayland compositor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/17
2018-02-07 04:35:57 +00:00
Didier Roche
cd0af33947 panel: center date entry with workarea
Align and center the date entry with the workspace's workarea.
This way, maximized applications have their window aligned with the top date
entry.
This doesn't change anything for desktops with no docks or when left/right
workareas are aligned with the monitor.

The offset is leftOffset - rightOffset:
(workArea.x - monitor.x) - (monitor.width - ((workArea.x - monitor.x) +
                                              workArea.width))

https://bugzilla.gnome.org/show_bug.cgi?id=792354
2018-02-06 11:19:58 +01:00
Christian Kellner
194040dcb2 thunderbolt: add policy provider and indicator
We will now basically act as "policy provider" for thunderbolt
peripherals by using org.freedesktop.bolt service: when new
devices are connect and session is a unlocked user session
we will automatically enroll (authorize and store in the database)
them.
If new devices are connected but the session is locked a message
will be shown informing the user that the device needs to be
reconnected to properly work.
The org.freedesktop.bolt service is provided by the "bolt" daemon.
2018-02-05 21:38:49 +01:00
Carlos Garnacho
8fdf47ea5b keyboard: Do not create widgetry for all keyboard groups at once
Instead do this on demand based on the current group. It is less
taxing at the time of initially creating the Keyboard object.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
82cecf2e36 keyboard: Add languages selection popup
Currently the language options displayed pretty much mirror those of the
top bar keyboard layout selection popup. It may make sense in the future
to only list languages, and automatically switch to the enabled IMs that
the OSK can benefit from (eg. by filling in suggestions).
2018-02-05 17:46:57 +01:00
Carlos Garnacho
d7f8a39023 keyboard: slide focused window on OSK visibility
The focused window will move up/down together with the OSK if the focus
area happens to be covered by the area to be covered by the OSK. This
state is reverted whenever the window loses focus, given it wasn't
relayout in between.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
e0852e5991 keyboard: Remove duplicate code
The same calls happen right at the beginning of the function.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
5cec4ae670 keyboard: Move extended keys pop up/down into the Key object
We do not need the parent Keyboard object to handle those specially, the
code can be self-contained enough. The Key object will simply emit
pressed/released events containing the keycode/string, be it from the
parent key or one contained in the BoxPointer.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
e4ee944d8d viewSelector: Send first printable keystroke to the search entry
StIMText used to handle key events for IM consumption in the capture phase,
this made the search box work automagically with nothing explicitly focusing
it. Since it's no longer the case, it has to be done somewhere.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
70bc94946f keyboard: add a special KeyContainer actor to contain keyboard layers
Instead of manually resizing each key everytime the keyboard needs to
relayout, have a special grid container that will preserve aspect when
resized.

This actor works in two stages though, first the keys need to be added
and then layoutButtons() need to be called for the actors to be
reparented to the container with the right attachment options.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
8c3f5b615f shell: Remove gdk_screen property/getter
It's used nowhere.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
a2303c5272 ibusCandidatePopup: Feed OSK suggestions from ibus panel candidates
We don't currently hide the ibus completion panel, and this is done from
within the popup that we are meant to hide itself, so thoroughly sucks.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
e0910c0f7c keyboard: Add visible property
So its visibility can be queried externally.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
5b1e705561 keyboard: Add Suggestions object/actor
This will display completion suggestions, that when clicked will get the
text inserted into the current IM focus.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
d93037c05e keyboard: Lookup minimum number of grid slots for each keymap
Instead of doing max() of all. Results on better used screen space on
every keymap.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
73c7441279 keyboard: Use InputMethod underneath 2018-02-05 17:46:57 +01:00
Carlos Garnacho
5914f225a2 misc: Add InputMethod class
This is a ClutterInputMethod implementation using IBus underneath. The
input method will interact with the currently focused ClutterInputFocus,
be it shell chrome or wayland clients through the text_input protocol.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
774930f1a1 keyboard: Ensure to resize keys after layer change
The keys possibly need resizing after a (new) layer has been set, there's
however calling places that don't. Instead, fold this._redraw() into
setActiveLayer().
2018-02-05 17:46:57 +01:00
Carlos Garnacho
7fd8fa3478 keyboard: Rework OSK
Caribou is no longer used to load keyboard layouts,
gnome-shell uses the JSON files extracted from Unicode
CLDR instead.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
33c3ed68fd keyboard: Drop message tray source, and tray focus handling
These are long unused.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
a1ce0da9e7 main: Load OSK layouts resource 2018-02-05 17:46:57 +01:00
Carlos Garnacho
7544bba0c1 keyboard: Restore intended OSK visibility behavior
Getting the necessary "setting enabled, or input from touchscreen"
conditions to have the OSK shown are not enough on the lack of a
current focus. As we are setting up the caret tracker here, wait for
the focus in event before showing the keyboard.

This fixes 2 issues, with the setting disabled it became really hard
to get the OSK hidden on eg. touchscreen->pointer device switches,
as visibility only depended on the a11y setting here. And secondly,
enabling the setting would always end up with the OSK being shown
regardless of focus, while it should stay hidden if there's no text
edition.

https://bugzilla.gnome.org/show_bug.cgi?id=788188
2018-02-05 17:46:57 +01:00
Carlos Garnacho
e09f8c87e8 padOsd: Fixup to the previous commit
Forgot to squash this change before pushing, I will leave something in the
money jar as I close the door.
2018-01-30 16:41:25 +01:00
Carlos Garnacho
9ad7f59cdb padOsd: Ensure to pick pad devices only
If the underlying X11 input driver creates multiple devices from a single
device node, we may end up picking up the wrong device. So, instead of
picking the first device based on node and bailing out if it's not a pad,
pick the first pad that has that device node, and bail out if there is
none.

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

Closes: #10
2018-01-30 16:19:42 +01:00
Florian Müllner
1d3154a89e networkAgent: Pick up VPN service dir from pkg-config
It turns out that NetworkManager does export the directory as pkg-config
variable after all, so use that instead of building the path ourselves
from the prefix.

https://bugzilla.gnome.org/show_bug.cgi?id=789811
2018-01-22 08:44:19 +01:00
Marco Trevisan (Treviño)
69da686fa9 dnd: Declare restore location variables
https://bugzilla.gnome.org/show_bug.cgi?id=791233
2018-01-17 13:04:41 -05:00
Marco Trevisan (Treviño)
35eac697c1 appDisplay: don't try to close the popup menu that is already destroyed
This would lead to a JS error otherwise, as we might end up
in deleting actors that have been already destructed.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2018-01-17 13:04:41 -05:00
Florian Müllner
705915cd31 keyboard: Don't pop up on touch events
We want touch events to enable the keyboard and focus tracking, but
not to actually show it right away. Implement that behavior by only
changing the visibility of the keyboard when triggered by a GSettings
change.

https://bugzilla.gnome.org/show_bug.cgi?id=788188
2018-01-16 17:41:46 +01:00
Florian Müllner
cf23490c37 keyboard: Split enabled setting from enabled state
We enable the keyboard when it is either enabled explicitly via
a11y settings or when using a touch device. We'll soon want to
special-case changes to the GSettings, so track its value in a
dedicated property.

https://bugzilla.gnome.org/show_bug.cgi?id=788188
2018-01-16 17:41:46 +01:00
Florian Müllner
d5f081a108 keyboard: Minor cleanup
_syncEnabled() will call _setupKeyboard() if necessary, so no need
to call it explicitly before.

https://bugzilla.gnome.org/show_bug.cgi?id=788188
2018-01-16 17:41:46 +01:00
Lubomir Rintel
16a1c35e28 network: unregister the agent when it's disabled
When the agent doesn't work (e.g. when the screen is locked), it shouldn't be
registered with NM. Otherwise it will keep cancelling the requests that
could happily be serviced with system secrets.

https://bugzilla.gnome.org/show_bug.cgi?id=789811
2018-01-12 11:50:49 +01:00
Lubomir Rintel
baacd216dd network: remove the vpn request when it's serviced
The native agent already forgets about the request at the point it's
serviced and the further attempt to use it (e.g. cancel it when the screen
is locked) will trigger an assertion failure:

  ** (gnome-shell:30862): CRITICAL **: shell_network_agent_respond: assertion 'request != NULL' failed

https://bugzilla.gnome.org/show_bug.cgi?id=789811
2018-01-12 11:48:52 +01:00
Lubomir Rintel
d71af5e579 network: port to libnm
The libnm-glib is depreacted for a long time already.

https://bugzilla.gnome.org/show_bug.cgi?id=789811
2018-01-12 11:48:49 +01:00
Olivier Fourdan
bc5be10d78 ui: Add keyboard accessibility dialog
Show a dialog informing the user each time the keyboard accessibility
flags are changed by one of the clutter backends (either from toggle
keys or two-keys-off modifiers).

https://bugzilla.gnome.org/show_bug.cgi?id=788564
2018-01-10 19:10:18 +01:00
Florian Müllner
f91fbd7728 network: Fix visibility of VPN section
Commit f2a9467f91 was too eager to simplify the code, and removed
the bits that hid the section in case no VPNs are set up - add them
back to fix the visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=787845
2018-01-10 10:11:25 +01:00
Florian Müllner
723c49a8b7 location: Use translated reason string
Gio now has API to look up localized strings from desktop files,
so we can display a correctly translated reason where available.

https://bugzilla.gnome.org/show_bug.cgi?id=779413
2018-01-09 00:25:46 +01:00
Florian Müllner
3f3e514ff2 networkAgent: Update VPN config path
The location moved a while ago, so update the path to point to
the non-deprecated location.

https://bugzilla.gnome.org/show_bug.cgi?id=791487
2018-01-09 00:25:46 +01:00
Ray Strode
94b96f8d97 background: don't leak wall clock when background changes
The background code allocates a GnomeWallClock when its first created,
but neglects to drop a reference to that clock at destroy time.
The undestroyed clocks lead to a timerfd leak that eventually prevents
the shell from functioning.

https://bugzilla.gnome.org/show_bug.cgi?id=791655
2017-12-15 10:57:14 -05:00
Bastien Nocera
29987ae033 dateMenu: Fix possible crash with unknown locations
If there are locations unknown to the libgweather version gnome-shell is
using, don't crash.

JS ERROR: TypeError: b.location is null
WorldClocksSection<._clocksChanged/<@resource:///org/gnome/shell/ui/dateMenu.js:141:1
WorldClocksSection<._clocksChanged@resource:///org/gnome/shell/ui/dateMenu.js:139:9

https://bugzilla.gnome.org/show_bug.cgi?id=791148
2017-12-06 02:02:48 +01:00
Bastien Nocera
a29ceb31dd dateMenu: Ignore malformed world-clocks settings
Guard against a malformed setting that doesn't contain a
'location' key.

https://bugzilla.gnome.org/show_bug.cgi?id=791148
2017-12-06 02:02:48 +01:00
Marco Trevisan (Treviño)
74683b7ef7 dash: Do not shadow ClutterActor's destroy()
Since commit ef1e27966d turned DashItemContainer into an StWidget,
the destroy() method overrides the ClutterActor method, which is at
the very least bad style. Instead, follow the usual pattern of using
a ::destroy handler.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2017-12-05 18:07:00 -05:00
Marco Trevisan (Treviño)
6c655a6c71 dash: Make sure item labels are only destroyed once
Labels are currently destroyed from both animateOutAndDestroy()
and destroy(), which now (rightfully) triggers a gjs warning. As
the label is created unconditionally since commit 36e5ae4a25,
mirror that and always release it in destroy() and hide it
elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2017-12-05 18:06:58 -05:00
Gautier Pelloux-Prayer
35a9c3ec86 extension: log message if extension could not be installed
https://bugzilla.gnome.org/show_bug.cgi?id=776940
2017-11-21 13:15:05 -05:00
Marco Trevisan (Treviño)
a46af9edf0 status/keyboard: Reset menuItems and Label objects on change
In the current code it could happen that we've menuItems and indicatorLabels
for sources that aren't anymore around, because in case a source is removed
we don't cleanup the their container objects.
Also, we should nullify InputManager's _currentSource when sources change
or it might point to some invalid data again.

So it could happen that we try to access an invalid menuitem or label
if a source change happens mentioning a source that has been deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=788931
2017-11-21 02:16:38 -05:00
Carlos Garnacho
cdc212ff6e overview: Protect ::drag-end handlers
These end up emitting item-drag-end/window-drag-end pretty much
without checks. Given the MetaDnd object may end up emitting
::drag-leave as a result of the plugin ending its grab, this
would result on spurious emission of those events and subsequent
warnings.

For extra paranoia, the _inDrag variable has been split into
_inItemDrag/_inWindowDrag so we can't cross the streams.

https://bugzilla.gnome.org/show_bug.cgi?id=784545
2017-11-17 14:34:40 +01:00
Stefano Facchini
feed029ae4 panel: focus windows on Escape key press
https://bugzilla.gnome.org/show_bug.cgi?id=671121
2017-11-01 20:52:58 +01:00
Florian Müllner
e765e684c3 windowAttentionHandler: Fix typo
Gah, thanks Alessandro Bono for the quick catch ...
2017-10-26 19:54:50 +02:00
Florian Müllner
eecbd4dd42 windowAttentionHandler: Follow app policy for attention notifications
While window attention notifications are created by the shell itself
rather than applications (most likely as a result of focus stealing
prevention), users still commonly link them to the application for
which they are shown. It makes therefore sense to follow the appropriate
policy set by the user rather than showing them unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=779974
2017-10-26 19:39:04 +02:00
Florian Müllner
100d6a7fa7 dialog: Reset initial focus on destroy
Since 0b02f757f8 we track the button that should have key focus
when the dialog is opened. However when the dialog is reused, the
button may get destroyed - clear the initial focus in that case to
allow setButton() to set a new one.

https://bugzilla.gnome.org/show_bug.cgi?id=788542
2017-10-26 18:14:52 +02:00
Florian Müllner
aa0858529e network: Spawn wifi panel for further WPA enterprise configuration
Settings recently split Wi-Fi configuration from the Network panel,
so launch that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=789231
2017-10-20 18:03:33 +02:00
Mario Sanchez Prada
fb3070981c bluetooth: Add missing 'BluetoothHardwareAirplaneMode' to D-Bus interface
This D-Bus property was never been added here, which caused inconsistencies
under some scenarios (e.g. coming back from suspend) if some devices were
previously paired, since _sync() would then make the bluetooth menu visible
unconditially, because of the proxied property evaluating to 'false'.

Adding this to the D-Bus interface makes sure that it's no longer undefined
and returns the right value, fixing the bug.

https://bugzilla.gnome.org/show_bug.cgi?id=789110
2017-10-17 20:16:38 +01:00
Florian Müllner
c12da66da8 popupMenu: Fix setting ImageMenuItem's icons via strings
Commit 28ca96064b added support for setting PopupImageMenuItem's icons
via GIcons as well as via strings. However as the check whether an object
implements the GIcon interface only works on GObjects, specifying an icon
name was broken. Fix that to actually allow both strings and GIcons.

https://bugzilla.gnome.org/show_bug.cgi?id=789018
2017-10-16 20:47:05 +02:00
Florian Müllner
01d8811913 gdm: Remove separate greeter universal access icon
The idea behind always showing the icon on the login screen is that
the users' needs aren't known at that point. However we can achieve
the same behavior by including the 'always-show-universal-access-status'
key in GDM's presets, so drop the special-case.

https://bugzilla.gnome.org/show_bug.cgi?id=788943
2017-10-13 16:53:54 +02:00
Jonas Ådahl
db43c45b12 layout: Unset primary and bottom monitor when headless
We were handling being initially headless by only setting the primary
and bottom monitor if there was any primary monitor, then checking the
primary monitor reference before making calls assuming there was any
monitors.

What we didn't do was unset the primary and bottom monitor when going
headless, meaning that temporarly disconnecting a monitor while having
windows open caused an assert to be triggered due to various code paths
taking the path assuming there are valid monitors.

Unsetting both the primary and bottom monitor when going headless avoids
the code paths in the same way as they were avoided when starting
headless.

https://bugzilla.gnome.org/show_bug.cgi?id=788607
2017-10-06 20:31:14 -04:00
Florian Müllner
7da5a76aaa popupMenu: Close menus on session mode changes
We are already closing top bar menus on session mode changes, but
as this behavior makes sense for any other menus as well - dash
context menus or the background menu for instance - just generalize
the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=787676
2017-10-04 18:12:27 +02:00
Florian Müllner
0b02f757f8 dialog: Fix setting buttons as initial key focus
Commit 1c7a3ee61b broke setting the initial key focus for default
buttons added via addButton(). Fix this by allowing the dialog class
to provide a different default widget to ModalDialog than the entire
dialog itself.

https://bugzilla.gnome.org/show_bug.cgi?id=788282
2017-10-04 18:12:27 +02:00
Florian Müllner
1939e22c22 workspace: Focus clone when highlighting
We don't use different hover- and focus indications for window previews,
so using keyboard navigation after hovering a clone often has surprising
results when the previous focus window wasn't the selected one. Address
this by simply moving the keyboard focus with the highlight.

https://bugzilla.gnome.org/show_bug.cgi?id=786546
2017-10-04 18:12:27 +02:00
Florian Müllner
8143f734f8 workspace: Fix tab navigation order
By default the focus chain uses the same order as the list returned
by clutter_actor_get_children(), which corresponds to the z-order.
This doesn't work well in the window picker, where clones follow
the stacking of windows to ensure a correct overview transition,
but previews are laid out purely based on space efficiency. As
a result, the order in which window previews are navigated when
tabbing around is essentially random. Fix this by providing a
focus chain implementation that is based on the visual layout
of the previews rather than the stacking.

https://bugzilla.gnome.org/show_bug.cgi?id=786546
2017-10-04 18:12:26 +02:00
Florian Müllner
156032a7ec weather: Mark conditions as significant
Otherwise the passed phenomenon/qualifier are ignored and a fallback
string is used.
2017-10-04 18:12:26 +02:00
Jonas Ådahl
5c37facc08 ui: Improve handling being headless
Don't assume there will always be a primary (logical) monitor, or any
(logical) monitor at all. This includes not allocating / layouting /
styling correctly when being headless.

The initial background loading will also be delayed until there are any
(logical) monitors connected.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
2017-10-04 11:50:21 -04:00
Martin Andersson
59fc26f821 calendar: Rebuild the calendar when the time zone changes
A time zone change can cause the date to change so we need to clear
SpiderMonkey's time zone cache and rebuild the calendar.

https://bugzilla.gnome.org/show_bug.cgi?id=678507
2017-10-04 16:44:07 +02:00
Florian Müllner
6321bbb773 windowManager: Disable OSK gesture on lock screen
On the screen shield, the only possible interaction is lifting the
shield. The on-screen-keyboard is not useful for that, and the drag
gesture from the bottom may in fact conflict with dragging up the
shield, so disable it.

https://bugzilla.gnome.org/show_bug.cgi?id=788339
2017-09-29 15:59:10 +02:00
Florian Müllner
3eb80dc6c0 calendar: Make notification icons font-relative
As notification icons now align with the title, it makes sense for
them to follow the text size in case a text-scaling-factor other
than 1 is applied.

https://bugzilla.gnome.org/show_bug.cgi?id=788265
2017-09-29 15:59:10 +02:00
Mario Sanchez Prada
023b50e7a7 messageTray: Check monitor's existence before trying to update the state
Not doing this will throw a backtrace when running on headless mode and
trying to show a notification, due to Main.layoutManager.primaryMonitor
being undefined, so it's better to return early.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
2017-09-28 16:32:00 +01:00
Krzesimir Nowak
1ef8722c52 notificationDaemon: Guard against invalid D-Bus object paths
When making any D-Bus call through the GDBus' proxy wrapper with an
invalid D-Bus object path, gnome-shell hangs.

Supposedly FdoApplicationProxy constructor should validate the passed
D-Bus object path and throw an error if the path is invalid. Since it
does not do that, we work it around by making sure that the deduced
D-Bus object path is valid or throw an exception if the path is not.

https://bugzilla.gnome.org/show_bug.cgi?id=787902
2017-09-25 15:57:20 +01:00
Krzesimir Nowak
ce7ff27c0c notificationDaemon: Consider hyphens for app ID to object path translations
Some application IDs contain hyphens, which are not allowed in D-Bus object
paths, so we need to update the translation by converting them to something
that's a valid object path. This is consistent with what GApplication does.

https://bugzilla.gnome.org/show_bug.cgi?id=787902
2017-09-25 15:57:07 +01:00
Mario Sanchez Prada
703187e996 dnd: Prevent dividing by zero when calculating the scale factor
This ensures that we snap back to the correct size when the
source actor has been scaled to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=787901
2017-09-22 15:50:07 +01:00
Florian Müllner
f5a28c2f24 remoteSearch: Fix remote search providers
Commit 289f982949 broke all remote providers when adding support for
non-auto-started search providers: Whether the provider should be
auto-started needs to be known in the constructor, so setting the
property on the constructed object doesn't work.

https://bugzilla.gnome.org/show_bug.cgi?id=787986
2017-09-21 16:53:32 +02:00
Didier Roche
9f0bb526f7 Make key-above-tab in switcher more consistent
Ensure that key-above-tab for selecting window application is consistent
with the down key.
After focus an application in the switcher:
- if you press down, the window thumbnails are previewed, and first element
  is selected
- if you press key-above-tab, the window thumbnails are previewed, however
  the second element is directly selected.
Make both interactions always select the first element.

https://bugzilla.gnome.org/show_bug.cgi?id=786009
2017-09-19 20:09:20 +02:00
Florian Müllner
80151a7d64 dnd: Declare dragMonitors with var
It is used outside the DND module itself.

https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
Florian Müllner
5a414fff44 windowManager: Remove excess parameter
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
Florian Müllner
2d11b5cea0 autorunManager: Avoid access to non-existent array element
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
Florian Müllner
ecddf1fffd Fix some more undefined property warnings
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
Bastien Nocera
289f982949 remoteSearch: Allow search providers not to auto-start
This would be used by search providers which only operate on data in the
running instance, such as the terminal's search provider which finds the
shell in the tab matching the search text.

https://bugzilla.gnome.org/show_bug.cgi?id=785380
2017-09-14 17:03:14 +02:00
Florian Müllner
bddc2c0016 dateMenu: Use icon for message indicator
Using a unicode character here means it may look quite different
from the intended style (for instance with emoji fonts). Avoid
this by providing a custom icon and use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=766368
2017-09-12 17:32:51 +02:00
Florian Müllner
56f4ce37cd dateMenu: Adjust to GWeather IAPI change
It's not exactly clear what changed - gobject-introspection, gjs - but
the newly added gweather_condition_to_string_full() API no longer works
like it used to. The replacement code does look more idiomatic anyway,
so just fix the code without investigating the reason of the breakage.

https://bugzilla.gnome.org/show_bug.cgi?id=787423
2017-09-12 17:32:51 +02:00
Jonas Ådahl
96e14dcbe7 boxpointer: If available, use source actor for constraining
If a source actor is set, use that for determining the arrow side (i.e.
whether the BoxPointer widget should expand in a certain direction).
This is better because it ensures that the popup is displayed on the
same monitor as the widget it originates from.

Without this, entering text with a vertically aligned input method
close to the bottom of a monitor would expand the BoxPointer downwards
on the monitor beneath it, instead of upwards, which is what one would
expect.

https://bugzilla.gnome.org/show_bug.cgi?id=786886
2017-09-04 16:28:58 +08:00
Michael Catanzaro
bb89c04611 appFavorites: Add Empathy to rename list
GUADEC beer to whomever gets a rename field into the desktop entry spec.

https://bugzilla.gnome.org/show_bug.cgi?id=786783
2017-08-30 21:16:16 -05:00
Sebastian Keller
a02399eea4 workspace: Align window previews with the pixel grid
Now that full-sized window previews are allowed again it makes sense to
align the window previews with the pixel grid to prevent unscaled
windows from looking blurry in the overview.
2017-08-23 18:12:09 +02:00
Ray Strode
3b81465d32 layout: actually hide keyboard when hiding keyboard
Right now we just tuck it off screen, which may leak onto another
screen.  This commit actually hides it.

https://bugzilla.gnome.org/show_bug.cgi?id=786332
2017-08-22 09:44:15 -04:00
Rares Visalom
52f604757c appDisplay: Include system actions in search results
The way system actions are displayed in the search
results is by appending them at the end of the list
returned by the ApplicationProvider.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 13:02:58 +02:00
Rares Visalom
9c3b3320f8 system: Split out system actions to its own module
In anticipation of showing the system actions in
the search results, it is fit to move action
specific code to its own module in order to
reuse it.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 12:09:04 +02:00
Rares Visalom
7d95275076 system: Don't leave overview when activating most items
The current behavior wasn't designed, but was introduced in commit
84efaac52b to work around technical limitations when we were still
using external tools like gnome-screensaver or gnome-session-quit
to handle the actions. Those limitations are long gone, so it makes
sense to make the actions consistent with the corresponding keyboard
shortcuts: Leave the overview when launching an application, and leave
it alone otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 12:09:04 +02:00
Florian Müllner
e8a2c06e4e inhibitShortcuts: Whitelist OS components
Users already have to trust their OS, so asking whether an OS component
should be allowed to perform an OS operation is odd at best, if not
confusing. Account for this by allowing system components that require a
keyboard grab to work - namely Setting's keyboard shortcuts panel - to
do so without triggering the permissions dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=786146
2017-08-22 12:09:04 +02:00
Rui Matos
b35dfc8914 windowManager: Add a switcher for mutter's switch-monitor keybinding
https://bugzilla.gnome.org/show_bug.cgi?id=783550
2017-08-22 10:50:56 +02:00
Rui Matos
c899453800 switcherPopup: Add support for modifier-less keybinding navigation
This drops the requirement that SwitcherPopups need a modifier based
keybinding to work.

The existing behavior for modifier based keybindings is kept but if
the popup is triggered from a no modifiers keybinding, instead of
finishing when the modifier is released, we use a timer that
automatically finishes the popup. The timer is reset on every key
release to allow navigation to happen.

https://bugzilla.gnome.org/show_bug.cgi?id=783550
2017-08-22 10:50:56 +02:00
Florian Müllner
2339351499 dateMenu: Use non-capitalized forecasts where appropriate
GWeather now provides us with API to request strings that don't
use sentence capitalization, so we can use it for summaries that
don't start a sentence to make for more natural phrases.

https://bugzilla.gnome.org/show_bug.cgi?id=779873
2017-08-21 15:43:34 +02:00
Rui Matos
f2a9467f91 network: Simplify and fix VPN settings menu item
As in commit b2b2f65 and furthermore it doesn't make much sense to
change the menu item according to the number of connections since all
connections here are of the same type.

https://bugzilla.gnome.org/show_bug.cgi?id=786520
2017-08-21 12:12:52 +02:00
Florian Müllner
b2b2f65214 network: Launch the appropriate settings panels
The new control-center shell split wifi configuration from the network
panel, and moved all other devices into a flat list. So instead of
manually spawning the app with the 'show-device' subcommand, we can
now simply launch the appropriate settings panel.

https://bugzilla.gnome.org/show_bug.cgi?id=786520
2017-08-20 18:03:32 +02:00
Florian Müllner
093b73b616 viewSelector: Open context for highlighted search result
To make search more efficient, users don't need to move the actual
keyboard focus away from the search entry to activate the first
result. However the shift+f10 shortcut to pop up the context menu
via keyboard still acts on the actually focused widget, which is
the entry. It makes more sense to open the context menu of the
selected result instead, as that's what's highlighted and responds
to keyboard activation.

https://bugzilla.gnome.org/show_bug.cgi?id=675315
2017-08-17 16:58:17 +02:00
Carlos Garnacho
1532ac3726 status/keyboard: Fix typo
Missing 't' in shortName, as it's used everywhere else.
2017-08-12 21:12:07 +02:00
Piotr Drąg
090063a1cc ui: fix a translator comment in InhibitShortcutsDialog
It needs to be exactly one line above the string to be picked up by gettext.
2017-08-11 19:45:02 +02:00
Mario Sanchez Prada
d903978937 Explicitly set the width and height for subicons' containers in folders
Otherwise the smaller icons will try to take too much space since the
texture rendering the icons will be scaled up on HiDPI displays according
to the scale factor, which will push the size of the StBin containing the
texture up, causing them to completely fill the folder's total space.

Explicitly setting the size of the StBin container in this case, in a
similar fashion to what we do when creating the empty placeholders (in
case where there are less than 4 apps in a folder), ensures that each
"cell" of the grid-like widget representing the folder does not take
too much space.

https://bugzilla.gnome.org/show_bug.cgi?id=786145
2017-08-11 12:47:45 +02:00
Mario Sanchez Prada
b8eeac6fcf Resize the user's avatar when scaling factor changes
We need to consider the scaling factor in effect when updating the user's
avatar, and also make sure to update it as well whenever the scaling
factor changes.

https://bugzilla.gnome.org/show_bug.cgi?id=786120
2017-08-11 12:47:45 +02:00
Marek Cernocky
11e71845d2 Changed _ to ngettext for message '%d more' 2017-08-11 03:06:10 +02:00
Florian Müllner
f1ee6c69d7 legacyTray: Time to say goodbye ...
The legacy tray introduced as part of the notification redesign in
3.16 was meant as a stop-gap solution to encourage applications to
move away from the concept of status icons, but it hasn't really
done anything except of getting in the way. Given that the large
majority of apps that still make use of status icons work perfectly
fine without them, we decided that it is time to drop this unloved
bit of UI altogether. Users who still want them (or use one of the
odd cases where an app really depends on the icon) can install one of
various extensions that are available, either based on the XEmbed
support that is still kept around or implementing the DBus-based
StatusNotifier spec.

https://bugzilla.gnome.org/show_bug.cgi?id=785956
2017-08-10 20:16:06 +02:00
Florian Müllner
6c472d8889 workspace: Show window chrome on long-press
Pointer hover and keyboard focus aren't available on touch devices,
so add long-press as alternative to reveal preview title and close
button.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
6816aea906 workspace: Move decision to show/hide chrome to clone
Currently the chrome layer decides itself which events on the window
clone should show or hide the chrome, which makes it harder to extent.
Instead, move the decision to the window clone by letting it emit
show/hide-chrome events when appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
1218e68b93 workspace: Allow full-sized window previews
Previews are currently limited to at most 70% of the actual window
size. This was done to indicate more clearly that the overview is
active and the window cannot be interacted with. However since then
other indications like the vignette effect have been added, so
artificially limiting the preview size doesn't look necessary anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
b3b30f239d workspace: Don't restrict title width to window preview
Now that only one window title is visible at any time, it no longer
matters if a title extends into other window previews, so we can
always show the full title.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
4fd5eee2c6 workspace: Only reveal title captions on hover
While the new title position gives the previews more space, they now
overlay the content which may hide valuable information. Address this
by only revealing the title as additional information on hover, like
we do for other auxiliary elements.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
8a911cdb5d workspace: Move window captions
We consider the window previews the primary way to identify a window,
so it makes sense to give them as much space as possible. So in order
to not have title captions take up too much vertical space, overlay
them on top of the preview borders.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
2d849759c8 overview: Don't expand workspace thumbnails by default
We currently expand the workspace switcher when workspaces are being
used, that is when there are any windows on a non-active workspace.
While this helps with the switcher's discoverability, it does eat into
the space available for window previews. By now the component should
be well established, so we can afford opting for space efficiency and
only expand the switcher while the user actually interacts with it.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
56c28fbb03 workspaceThumbnails: Reduce maximum thumbnail size
The overview's window picker is primarily about windows, and as the
previews that represent them are more effective the bigger they are,
it makes sense to scale down competing elements; start by reducing
the size of workspace thumbnails on the right ...

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
Florian Müllner
1095489cee workspaceSwitcherPopover: Remove pointless timeout
Ever since commit a4e53953, the popup has been hidden initially, so
there's little point in setting up a timeout handler to hide it ...
2017-08-10 20:16:06 +02:00
Carlos Garnacho
508e3e518e padOsd: Add one to the >1 rings
Ring leader/label SVG elements for the second ring are named *Ring2*.
We need to add one here for elements >1, this is consistent with strips.

https://bugzilla.gnome.org/show_bug.cgi?id=785358
2017-08-03 22:06:33 +02:00