Commit Graph

6026 Commits

Author SHA1 Message Date
Rui Matos
1220e0124a extensions: Add a SESSION_MODE extension type
This allows e.g. gnome-tweak-tool to present these extensions in a
different way since they can't be disabled.
2019-02-17 12:28:04 -05:00
Rui Matos
7d9a39c72c shellDBus: Add a DBus method to load a single extension
This allows e.g. gnome-tweak-tool to install an extension from a zip
file and load it into the running shell.
2019-02-17 12:28:03 -05:00
Ray Strode
b474ea0b7c gdmUtil: enable support for GDM's ChoiceList PAM extension
This commit hooks up support for GDM's ChoiceList PAM extension.
2019-02-17 12:28:03 -05:00
Ray Strode
d4b211bd23 gdm: add AuthList control
Ultimately, we want to add support for GDM's new ChoiceList
PAM extension.  That extension allows PAM modules to present
a list of choices to the user. Before we can support that
extension, however, we need to have a list control in the
login-screen/unlock screen.  This commit adds that control.

For the most part, it's a copy-and-paste of the gdm userlist,
but with less features.  It lacks API specific to the users,
lacks the built in timed login indicator, etc. It does feature
a label heading.
2019-02-17 12:28:03 -05:00
Ray Strode
f7b47666b2 loginDialog: allow timed login with disabled user list
At the moment the timed login feature is implemented in the user list.
If there's no user list, we don't show the indicator anywhere and
don't proceed with timed login.

This commit allows timed login to work when the user list is disabled.
It accomplishes this by putting the timed login indicator on the
auth prompt, in that scenario.
2019-02-17 12:28:02 -05:00
Ray Strode
241585479b authPrompt: stop accepting preemptive answer if user stops typing
We only want to allow the user to type the preemptive password in
one smooth motion.  If they start to type, and then stop typing,
we should discard their preemptive password as expired.

Typing ahead the password is just a convenience for users who don't
want to manually lift the shift before typing their passwords, after
all.
2019-02-17 12:28:02 -05:00
Ray Strode
31612927b2 authPrompt: don't spin unless answering question 2019-02-17 12:28:02 -05:00
Ray Strode
65229b6299 authPrompt: don't fade out auth messages if user types password up front
Right now we fade out any stale auth messages as soon as the user starts
typing. This behavior doesn't really make sense if the user is typing up
front, before a password is asked.
2019-02-17 12:28:02 -05:00
Ray Strode
53f1d46fb5 gdm: update default service when smartcard inserted
Early on at start up we may not know if a smartcard is
available.  Make sure we reupdate the default service
after we get a smartcard insertion event.
2019-02-17 12:28:02 -05:00
Ray Strode
04d526e9f5 gdm: only unlock with smartcard, if smartcard used for login
If a smartcard is used for login, we need to make sure the smartcard
gets used for unlock, too.
2019-02-17 12:28:02 -05:00
Ray Strode
8593532801 smartcardManager: add way to detect if user logged using (any) token
If a user uses a token at login time, we need to make sure they continue
to use the token at unlock time.

As a prerequisite for addressing that problem we need to know up front
if a user logged in with a token at all.

This commit adds the necessary api to detect that case.
2019-02-17 12:28:02 -05:00
Ray Strode
1e0ec69c41 screenShield: unblank when inserting smartcard
If a user inserts the smartcard when the screen is locked/blanked
we should ask them their pin right away.

At the moment they have to wiggle the mouse or do some other
action to get the screen to unblank.
2019-02-17 12:28:02 -05:00
Ray Strode
a506d86139 gnome-shell-favourite-apps-firefox.patch 2019-02-17 12:28:01 -05:00
Florian Müllner
9c51c87d8c 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 23:03:42 +02:00
Florian Müllner
db2245d60b 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-13 15:11:43 +02:00
Florian Müllner
f26cc3ac23 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-13 15:11:43 +02:00
Marco Trevisan (Treviño)
02c5b4b947 workspaceThumbnail: remove unused private win reference 2018-07-13 15:11:43 +02:00
Carlos Garnacho
df57829ea1 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:52:27 +02:00
Didier Roche
da96408098 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.


(cherry picked from commit d6d09fd3c8)
2018-06-20 23:24:07 +00:00
Joe Rabinoff
4ff7e84c51 Change "const" to "var"
These variables are in fact used from other modules, so gjs complains about them
being const.


(cherry picked from commit 8237a1f6e0)
2018-06-20 22:30:17 +00:00
Daniel van Vugt
9f76b6e4a2 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


(cherry picked from commit 94101e8bb8)
2018-06-07 08:42:32 +00:00
Mario Sanchez Prada
9a2597f80b 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


(cherry picked from commit d8b9e23502)
2018-05-17 20:28:26 +00:00
Florian Müllner
e1ed4b25e1 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


(cherry picked from commit c0a453f64f)
2018-05-09 14:53:15 +00:00
Florian Müllner
220514d10e 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-08 22:02:11 +02:00
Silvère Latchurié
18312d9ccd 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 22:02:11 +02:00
Ray Strode
234b1441e4 keyboardManager: take group index into account when preserving keymap
commit 642107a2 attempts to avoid resetting the current keymap on
spurious input source changes.

It does this by checking if the current layout id is found in
the new list of layouts and resetting the current layout to the
associated match in the list. By not nullifying the current
layout, it won't get subsequently reset.

Unfortunately, if the order of the list changes, resetting the
current keymap is still necessary, since the order corresponds
with the index of the activated group.

This commit changes the code to nullify the current layout if
its group index changes.

https://bugzilla.redhat.com/show_bug.cgi?id=1573923
2018-05-08 13:56:55 -04:00
Carlos Garnacho
702338bc7d keyboardManager: Preserve current keymap across reloads
The IM can pretty much update the input sources anytime (even if
to set the same ones). That ends up triggering rebuilding all user
defined keymaps, and losing modifier state if we are unfortunate
enough that this caught us while pressing one.

One common situation seems to be password entries, resulting in
the wrong character being printed if the first character happens
to require the shift key.

If the current keymap is not found in the newly loaded list,
this._current will end up null, with the same behavior as we get
currently (immediate keymap reload).

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

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

Closes: #240
2018-04-29 17:52:56 +02:00
Florian Müllner
7c9dbc66d9 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 22:39:15 +02:00
Marco Trevisan (Treviño)
b476e851b7 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


(cherry picked from commit 5fcf40b973)
2018-04-18 00:35:42 +00:00
Marco Trevisan (Treviño)
a27be6a540 workspaceThumbnail: rebuild thumbnails if workareas size changed
https://bugzilla.gnome.org/show_bug.cgi?id=792687


(cherry picked from commit c29bd46e7a)
2018-04-18 00:34:45 +00:00
Marco Trevisan (Treviño)
4b6a57fabe workspaceThumbnail: initialize porthole based on workArea
https://bugzilla.gnome.org/show_bug.cgi?id=792687


(cherry picked from commit b99e304f1e)
2018-04-18 00:33:39 +00:00
Mario Sanchez Prada
92758890bb 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.


(cherry picked from commit cdbc99e992)
2018-04-18 00:32:37 +00:00
Florian Müllner
5cc42b18b0 utils: Simplify URL regex to only support one layer of parentheses
The author of the original URL-matching regex warns[0] that the pattern may
cause certain regex engines to lock up with certain input, namely patterns
that contain parentheses. It turns out SpiderMonkey is affected, but rather
than switching to the author's improved version (that is still crazy), sim-
plify the pattern a bit by removing support for nested parentheses in URLs.
Even a single pair of parentheses is extremely rare, so this is unlikely to
make a noticeable difference (other than not locking up SpiderMonkey of
course) ...

[0] http://daringfireball.net/2010/07/improved_regex_for_matching_urls
2018-04-13 18:15:44 +00: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
36c7d65ccf inputMethod: Pass all key events through the current IM method
Even though we are using an "xkb" source, it still makes sense to
pass the event through the IBus simple engine, in order to let it
handle compose keys and ctrl+shift+[u|e].

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

Closes: #115
2018-03-15 16:09:38 +01: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