Commit Graph

5616 Commits

Author SHA1 Message Date
Florian Müllner
ccacb5f6de background: Update animations when coming back from suspend
We currently reload animated backgrounds on timezone changes, but
there are other cases where the time can change unexpectedly and
the background no longer matches the time of day. One case we can
easily handle is when coming back from suspend, so do that.

https://bugzilla.gnome.org/show_bug.cgi?id=773265
2016-10-30 21:10:32 +01:00
Florian Müllner
205880e74e screenShield: Only allow graphs to lift shield when locked
Since commit 67615a0cbc, any printable key can be used to lift the
screen shield rather than just escape/enter/space. While this is
convenient for unlocking where the input is forwarded to the password
entry, it is potentially dangerous when the screen is inactive but
not locked: If the user types her password, the first character will
lift the shield and the remaining input will go to the focused window.
To prevent this from happening, only allow printable keys when the
screen is actually locked and restrict the key presses that lift the
shield to the original set of escape/enter/space otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=773328
2016-10-21 22:21:55 +02:00
Bastien Nocera
009d021e4f appDisplay: Add a menu item to launch on the discrete GPU
It will only show up when a discrete GPU is available (detected through
the switcheroo-control D-Bus service), and the application hasn't
alreayd been launched.

Note that this will not currently work for D-Bus activated applications,
eg. the menu item will be available, but the environment variable will
not be passed through to D-Bus to use when launching the application.

https://bugzilla.gnome.org/show_bug.cgi?id=773117
2016-10-21 19:26:49 +02:00
Bastien Nocera
39a840e2c3 shell-app: Add "discrete_gpu" option when launching apps
And adapt existing callers to the new API. This will allow us to
implement a way to launch applications on the discrete GPU for systems
where an "Optimus" system exists.

https://bugzilla.gnome.org/show_bug.cgi?id=773117
2016-10-21 19:26:49 +02:00
Florian Müllner
d769b72c43 extensionUtils: Use a unique 'subdir' to create new importers
Apparently importers for the 'same' path are shared, even when the
relative paths resolve to different absolute ones. Until this bug
is fixed properly, we can work around this by expressing the current
extension path as the UUID relative to the parent directory.

https://bugzilla.gnome.org/show_bug.cgi?id=772386
2016-10-18 19:19:32 +02:00
Philip Chimento
ed99bef458 extensionUtils: Remove ShellJS library
You can define a new importer object by importing a subdirectory in GJS.
This is undocumented, but it is likely to at least hold until the whole
thing moves to ES6 modules, after which we'll be able to do this purely
in JS with Reflect.Loader.

Since this was the only thing the ShellJS library did, we can remove it
altogether.

This allows us to discontinue use of the gjs-internals-1.0 embedder API.

https://bugzilla.gnome.org/show_bug.cgi?id=772386
2016-10-17 12:36:16 -07:00
victoryang
5b339c8371 authPrompt.js: turn off the ellipsization of pam messages
When the user gets long failure messages from pam, the authPrompt
message label will clip the message and ellipsize with '…'.

This commit turns off ellipsization from the label, so it will
properly wrap.

https://bugzilla.gnome.org/show_bug.cgi?id=764445
2016-10-14 09:28:34 -04:00
Bastien Nocera
9c6e68f3e7 bluetooth: Replace "Not In Use" status string with "On"
If Bluetooth is on but there aren't connected devices, the status in the
menu reads "Not in Use". This is potentially confusing: it's a negative
statement, even though Bluetooth is on. It also sits uneasily (and looks
even more confusing) next to the submenu item "Turn Off".

Changing the string to "On" is better.

https://bugzilla.gnome.org/show_bug.cgi?id=756432
2016-10-12 10:35:31 +02:00
Jonh Wendell
70526a8025 log(): Reimplement on top of GLib.log_structured
This allows us to pass metadata fields besides the message
to log. So, if the log() call is made from an extension,
pass the extension name and UUID to the logger.

This is useful for extension developers to debug their code
as well as to instruct their users to send debug info to them
by running something like this:

journalctl GNOME_SHELL_EXTENSION_UUID=<extension@uuid>

https://bugzilla.gnome.org/show_bug.cgi?id=770717
2016-10-11 10:17:12 -03:00
Jonh Wendell
c405081d89 extensionUtils: Allow getCurrentExtension() to be called from anyone
Currently it's assumed only an extension can call this method. However
it can be useful if any part of the shell want to know if it was invoked
by an extension.

https://bugzilla.gnome.org/show_bug.cgi?id=770717
2016-10-11 10:14:23 -03:00
Dan Williams
384e01b368 network: request periodic scans while the WiFi list is open
NM upstream would like to reduce periodic scanning, and that means
that clients should request scans themselves while their WiFi list
is open.  Similar to the Windows and macOS WiFi dialogs/lists.

https://bugzilla.gnome.org/show_bug.cgi?id=767918
2016-10-11 14:43:19 +02:00
Cosimo Cecchi
f819654ec8 osdWindow: always round-up sizes when updating allocation
This fixes the OSD window flickering horizontally at certain
resolutions.

https://bugzilla.gnome.org/show_bug.cgi?id=772287
2016-10-10 17:24:52 -07:00
Cosimo Cecchi
4670db6629 osdWindow: relayout when scale factor changes
We currently rely on the "monitors-changed" signal of LayoutManager to
relayout the OSD window. That is not enough, since the scale factor also
changes the way the OSD window is sized, and that can be updated after
"monitors-changed" has been received.
The visual effect is that under some circumstances, the OSD window will
have the wrong size under HiDpi.

This commit fixes the issue by triggering another relayout when the
scale factor changes.

https://bugzilla.gnome.org/show_bug.cgi?id=772723
2016-10-10 17:24:52 -07:00
Florian Müllner
d4ce51b1b7 altTab: Consider attached modals for window order
Similar to bug 667552 for the app switcher, attached modal dialogs
can result in an unexpected window order in the window switcher:
Selecting a window with an attached dialog will focus the dialog
instead, but as the dialog itself is ignored in the window list,
its last-used timestamp is not taken into account for the position
in the MRU list. Fix this by fetching the list of all NORMAL windows
and filter out skip-taskbar windows ourselves, while making sure that
windows appear in the position of their attached modal dialog where
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=747153
2016-10-07 14:51:15 +02:00
Florian Müllner
d0bab1f7ac network: Initialize primary and VPN connections on startup
We only connect to the corresponding property notifications after both
Client and RemoteSettings are ready, so we may miss the initial signal
emission. Make sure to pick up the connections in this case to fix the
network indicator not showing up.

https://bugzilla.gnome.org/show_bug.cgi?id=772249
2016-09-30 13:50:30 +02:00
Florian Müllner
becd29c50a altTab: Skip unminimize effect when cycling to a window
Similar to windows on another workspace, selecting a minimized window
doesn't look quite right - the selected window disappears, then animates
back in. Fix this by adding support for skipping the next effect to the
wm and use it to bypass the unminimize animation.

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:00:54 +02:00
Florian Müllner
a029a35050 altTab: Improve cycling to a window on another workspace
Both 'cycle-group' and 'cycle-window' shortcuts allow cycling through
windows on all workspaces. While this works, it looks quite broken
since we started showing clones for highlighting: the selected window
vanishes (when its clone is destroyed), then slides back in with its
workspace. Instead, slide the selected window to its workspace like
we do for the 'move-to-workspace-*' shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:00:54 +02:00
Florian Müllner
d6a78d61d1 altTab: Restore correct visibility when cycling windows
Commit 3171819c improved window cycling by using a dedicated to clone
for highlighting rather than activating all cycled windows. Original
window actors are hidden while its clone is showing, and shown again
afterwards, however the latter is wrong for actors that are not supposed
to be visible (for example where the window is minimized, or on a different
workspace). Fix this by properly syncing the actor's visibility instead
of showing it unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:00:54 +02:00
Florian Müllner
695bfb9616 extensionPrefs: Fix extension list width
ScrolledWindow changed its allocation behavior, and the extension
list only takes up the minimum width rather than the available
width as intended. To get the previous behavior back, we need
to set the newly added :propagate-natural-width property ...

https://bugzilla.gnome.org/show_bug.cgi?id=771391
2016-09-14 09:18:23 +02:00
Michael Catanzaro
cae4d92191 loginDialog: fix cancel button in ask for username mode
If the user clicks Not Listed? to enter ask for username mode, clicks
cancel, and then attempts to log in via the user list, the user will see
"Authentication failed" after correctly typing the password, and then
will become stuck in an empty screen with just the gray noise background.

The problem is, we forgot to disconnect from the signal that's waiting
for the next button to be pressed on the username entry screen. Since
the signal handler that executes here is expecting the username to be
input, and isn't prepared for us to have switched back to user list,
various bad things happen. We try to start two gdm-password
conversations at once, for instance, one using the user's password as
the username. I stopped investigating here, because it's easy to fix by
disconnecting from the signal at the right time.

https://bugzilla.gnome.org/show_bug.cgi?id=770328
2016-09-10 16:50:53 -05:00
Florian Müllner
06d0e7d74a telepathyClient: Always clear pending messages on destroy
Since commit 82950ecea, we acknowledge pending messages when closing a
chat notification for a channel we are handling to prevent the channel
from popping up again immediately. While this isn't an issue for channels
we don't handle, the unread messages of the destroyed notification are
still considered for the messages indicator in the top bar, which is
clearly confusing (in particular when we end up showing the indicator
without any notifications in the list). As it's arguably correct to not
meddle with a channel handled by someone else, just reset the cache of
pending messages to address this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=770888
2016-09-09 23:54:28 +02:00
Rui Matos
02a51bfa65 windowManager: Fix windows not getting undimmed while hidden
Mutter's plugin destroy event doesn't happen if a window is hidden
when it gets unmanaged so we also need to handle the
MetaWindow::unmanaged signal to check whether the parent should
dimmed.

https://bugzilla.gnome.org/show_bug.cgi?id=752524
2016-09-09 17:17:07 +02:00
Rui Matos
dbd04df311 windowManager: Fix windows not getting undimmed in some cases
meta_window_foreach_transient() iterates through all transients of a
window, not only direct transients. This means that simply checking if
a transient is an attached dialog isn't enough because it might be a
non-direct transient for the window we're checking, in which case we
don't want to dim the window.

In particular this fixes windows not getting undimmed when they have
more that one level of transient children and the direct transient gets
destroyed. In that case we would still find at least one non-direct
transient child and decide to keep the window dimmed.

https://bugzilla.gnome.org/show_bug.cgi?id=770163
2016-09-09 17:17:06 +02:00
Florian Müllner
3171819c36 altTab: Don't mess up MRU order while cycling windows
Commit bd6e7f14d1 reimplemented the cycle keybindings to
fix cycling between more than two windows, but the approach
of highlighting cycled windows by actually focusing them has
the drawback that cycling messes up the MRU order of windows.
To fix this, only change the window focus when the operation
finishes, and use a dedicated actor that draws a border around
a window clone for highlighting.

https://bugzilla.gnome.org/show_bug.cgi?id=771063
2016-09-08 21:32:10 +02:00
Rui Matos
e4976b535d WorkspaceSwitcherPopup: allow input events to pass through
There's no particular reason for this actor to be reactive and thus
preventing input events to reach actors underneath, e.g. quickly
clicking on something while the popup isn't yet finished animating
out.

https://bugzilla.gnome.org/show_bug.cgi?id=770382
2016-09-08 19:29:50 +02:00
Carlos Garnacho
c3e68955e3 keyboard: Implement more of the wayland caribou adapter
Have it notify properly of changes to the current input source, as
well as exposing those in get_groups().

The support for virtual keyboard events has been replaced by
ClutterVirtualInputDevice, which can be thought of as the equivalent
to the XTEST devices in X11.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:23:58 +02:00
Florian Müllner
4fc0c513af Provide org.freedesktop.impl.portal.access implementation
If a sandboxed app requests access to some system resource (camera,
microphone, location), the portal frontend needs to ask the user
for permission. In GNOME, we want this to be a system modal dialog,
so provide an org.freedesktop.impl.portal.access implementation
that exposes a generic system modal permission dialog on the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=768669
2016-07-20 17:14:12 +02:00
Florian Müllner
8347152730 calendar: Do not overload :active to mark selected day
We currently use the :active pseudo class to mark the selected day
in the calendar. Whenever the selected date changes, the class is
added to the corresponding button and removed from all others.
However when the selected date doesn't change (i.e. when clicking
the already selected date), the buttons are not updated and the
use of the :active class conflicts with StButton's builtin handling
of the class - the class is removed on the button up event and the
button is deselected.
Fix this by simply using a different pseudo class.

https://bugzilla.gnome.org/show_bug.cgi?id=746867
2016-07-08 16:11:43 +02:00
Florian Müllner
3d77dd8f51 calendar: Refresh calendar when ignored events changes
The last patch fixed marking days in the calendar where all
events are ignored, but it doesn't pick up the change when
an event is hidden. Emit an appropriate change notification
to fix this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=768538
2016-07-08 15:01:32 +02:00
Florian Müllner
82e6935281 calendar: Move handling of ignored events to event source
Ignoring events is currently implemented in the message list's
event section, which means that the calendar does not consider
ignored events when marking days with events. In order to fix
this, move the handling of ignored events to the event source,
which is shared between both components.

https://bugzilla.gnome.org/show_bug.cgi?id=768538
2016-07-08 15:01:32 +02:00
Florian Müllner
128697d6a7 osdWindow: Use a constraint to enforce ratio
Commit 9b07ce1d0d broke the code that keeps the OSD window square.
Use that opportunity to move away from the hack of setting the
min-height style property from code and adjusting the width on
allocate, and implement a proper constraint instead.

https://bugzilla.gnome.org/show_bug.cgi?id=768317
2016-07-05 20:46:57 +02:00
Florian Müllner
424fa01eca osdWindow: Fix blurry level bar
ClutterActor:width is a floating point property, so it will not be
automatically rounded to non-fractional values that properly align
to pixels. To fix the resulting blurriness, add explicit rounding.

https://bugzilla.gnome.org/show_bug.cgi?id=768317
2016-07-05 20:41:13 +02:00
Florian Müllner
775187b2e4 osdWindow: Fix level bar width
Commit 9b07ce1d0d changed the OSD window's level bar to be a regular
actor instead of a custom drawn bar. The bar actor's width depends on
both the configured level (e.g. 40%) and the available width, however
the width is currently only updated when the configured level changes.
Fix that by properly considering changes to the parent's width as well.

https://bugzilla.gnome.org/show_bug.cgi?id=768317
2016-07-05 17:47:44 +02:00
Florian Müllner
99b5e10acf overview: Move ::scroll-event signal handling (again)
Commit c39ffa111 moved the signal handling from the controls- to the
background-group to enable scrolling on non-primary monitors.
However this broke scrolling on reactive overview elements as the
workspace switcher, as they're not descendants of the background.
To fix, move scroll-event handling to the overview group itself,
which is the common ancestor of all overview elements.

https://bugzilla.gnome.org/show_bug.cgi?id=768316
2016-07-05 17:47:44 +02:00
Owen W. Taylor
61fb62f969 Restart: fix maximized windows flickering to the wrong struts
When we restart, we need to update the struts for the screen before
we enter the main loop, or maximized windows will get resized to the
size of the screen without struts, then resized back.

A workaround is needed for a Clutter bug that occurs when we get
the size of an actor before the first paint of the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=761566
2016-06-30 14:17:19 -04:00
Kalev Lember
ab68360d53 endSessionDialog: Add support for system upgrades
https://bugzilla.gnome.org/show_bug.cgi?id=763611
2016-06-30 11:42:11 +02:00
Kalev Lember
58a733dc93 endSessionDialog: Use new PackageKit DBus API
https://bugzilla.gnome.org/show_bug.cgi?id=763611
2016-06-30 11:33:07 +02:00
Kalev Lember
db8f6b4848 endSessionDialog: Rename a variable
https://bugzilla.gnome.org/show_bug.cgi?id=763611
2016-06-30 11:33:06 +02:00
Hyungwon Hwang
e72d388a67 background: free MetaBackground explicitly when its MetaBackgroundActor is destroyed
The memory which MetaBackground resides is freed automatically, when its
wrapper object Background is freed by garbage collection. But because the
memory for MetaBackground is huge, changing the background or changing the
background mode repeatedly makes a lot of memory to be in use until garbage
collection runs.

This patch frees the MetaBackground object explicitly when its
MetaBackgroundActor is destroyed which is the moment that the memory in the
object is not used anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=766353

Signed-off-by: Hyungwon Hwang <hyungwon.hwang7@gmail.com>
2016-06-29 13:27:10 +02:00
Rui Matos
b5dd4d1456 screenShield: Chain up Arrow's style_changed vfunc
This makes style changes propagate to our child widget as they
should.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-28 19:53:17 +02:00
Rui Matos
a7562b4148 screenShield: Stop using an offscreen buffer for the arrow actor
This isn't a performance critical actor and the NVIDIA driver discards
offscreen buffers in some cases which would require us to go through
extra hoops to handle here which isn't worth it.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-28 19:53:17 +02:00
Rui Matos
358f64d66b main: Reload theme on video memory purge errors
The theme machinery uses FBOs in some cases (mainly for shadows) which
need to be reloaded if we get a video memory purged error.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-28 19:53:17 +02:00
Florian Müllner
21ddbf0b8f workspacesView: Consider workspaces-only-on-primary when panning
It is odd to switch workspaces on the primary monitor when panning on
a monitor without workspaces, so reject the gesture on non-primary
monitors when workspaces-only-on-primary is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
2ad2853278 workspacesView: Consider workspaces-only-on-primary when scrolling
It is odd to switch workspaces using the scroll wheel when the pointer
is on a monitor without workspaces, so only handle scroll events on
non-primary monitors when workspaces-only-on-primary is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
e16f63a8e4 workspacesView: Allow activating empty workspaces on any monitor
We allow activating a workspace by clicking it when we know that
the user did not try to select a window and missed (namely: the
workspace is empty). However we currently always check for an
empty workspace on the primary monitor, which doesn't make sense
when the click happened on a different monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
c39ffa111f overview: Move overview actions and scrolling to background group
Both the Overview::scroll-event and actions added via addAction()
are meant to work anywhere in the overview, but for now only work
on the primary monitor. Move the handling to the background group
that is known to span all outputs to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
5182129196 overview: Remove stack actor
The stack was used to overlay a message indicator over the overview
group. That indicator is long gone, so there's no longer a need for
an intermediate actor in the hierarchy.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
02bad8e92b workspacesDisplay: Cancel click when panning
When switching between workspaces via panning, we don't want to
leave the overview when we end up on an empty workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Rui Matos
500ea13155 workspacesView: Initialize the adjustment's upper bound
Initializing the upper bound to zero means that on panning we'd start
scrolling from the first workspace even if the current workspace when
entering the overview was different since StAdjustment clamps the
value to be inside bounds.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 14:43:17 +02:00
Rui Matos
408211ba73 Arrow: compute a paint volume that accounts for the shadow
Otherwise the shadow gets clipped to the actor's allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=767954
2016-06-23 18:57:05 +02:00