Commit Graph

5426 Commits

Author SHA1 Message Date
Mario Sanchez Prada
d8e7fc403b appDisplay: Add a null-check for the scrollview's fade ClutterEffect
This effect will only be created when the StScrollView actor has either
a non-zero vertical or horizontal fade offset defined, so we need to
add a null-check in these two cases before assuming it's there.

https://bugzilla.gnome.org/show_bug.cgi?id=783823
2017-06-15 15:01:51 +01:00
Florian Müllner
3d6fdc8ae2 sessionMode: Drop unused import 2017-06-15 15:52:37 +02:00
Florian Müllner
ce262b36d4 autorunManager: Remove unused import 2017-06-09 16:58:15 +02:00
Florian Müllner
e02d6e5285 panel: Update .solid style on session mode changes
The .solid style isn't supposed to apply for modes that don't support
windows, but for this to work we have to update the style on session
mode changes.

https://bugzilla.gnome.org/show_bug.cgi?id=783202
2017-05-30 11:41:35 +02:00
Florian Müllner
7e7e3ec016 lookingGlass: Use standard icon names for GC icon
Commit b929320d4 added a toolbar item to force garbage collection,
however it won't be visible for most users, as it uses a non-standard
legacy icon name (the default icon theme dropped it as far back as 2009).

https://bugzilla.gnome.org/show_bug.cgi?id=782982
2017-05-24 23:39:51 +02:00
Alessandro Bono
83fb34608c windowManager: Add animations for maximize and unmaximize
The fullscreen animation code is now generic enough to handle any
size change animations, so stop limiting it to (un)fullscreen to
get animations on (un)maximize as well.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
a72f0604dc windowManager: Rename functions and variables
Stop using the word 'fullscreen' since the code is also
going to be used for maximize and tile actions.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
4dfad536a3 windowManager: Use sourceRect for consistency
Now that we always pass the old frame rect, we can use that
instead of picking up the dimensions of the clone actor.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
0dca5e513b windowManager: Generalize translation values
Currently, the translation values are set with the assumption that
one of the actors represents a fullscreen window. In order to
generalize it for any size change transition, we can simply swap
the monitor rect with the source or target rect as appropriate,
and translate the actor from the target to the source position by
subtracting the former and adding the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
7090592477 windowManager: Rename variable
Since there is already targetRect that represents where the
window is going to move, rename oldRect to sourceRect to
represent from where the window is moving.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Carlos Garnacho
e94de67bd2 switcherPopup: Ignore implicit enter events when the popup is mapped
If the popup happens to be mapped beneath the pointer, mutter will now
emit an implicit enter notify event (i.e. not caused by pointer motion).
In this case the switcherPopup still goes and selects the item, which
results in too sensitive alt-tab menus if the pointer happens to be in
the wrong place.

Make highlighting rely on motion events instead, so it always involves
user interaction when triggered by the pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=755164
2017-05-23 18:38:35 +02:00
Alessandro Bono
447bf55e45 panel: Add transparency when free-floating
The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.

https://bugzilla.gnome.org/show_bug.cgi?id=747163
2017-05-19 18:58:40 +02:00
Carlos Garnacho
41baf0fc74 keyboard: Drop dbus naming semantics from Set[Entry|Cursor]Location
Those functions don't proxy dbus method calls anymore, so just drop the
uppercase 'S'.

https://bugzilla.gnome.org/show_bug.cgi?id=777342
2017-05-15 14:50:02 +02:00
Carlos Garnacho
c324395ee6 keyboard: Remove Show/Hide calls
And merge with the "internal" show/hide() ones. Those functions don't
proxy dbus method calls anymore, so it makes no sense to expose these.
Also, the timestamp is no longer needed as there is a single source for
these events.

https://bugzilla.gnome.org/show_bug.cgi?id=777342
2017-05-15 14:50:02 +02:00
Carlos Garnacho
aecd1c126a keyboard: Avoid runtime dependency on the Caribou daemon
The caribou daemon only gives us focus tracking, which is almost 1:1 with
our own FocusCaretTracker implementation. This means we can entirely
replace the Caribou daemon inside gnome-shell, reducing the Caribou
dependency to just libcaribou, and more specifically the
CaribouKeyboardModel we pull the keyboard models from.

As we still need underneath a CaribouDisplayAdapter to drive the keyboard,
reuse the wayland one, which has been renamed to make it look generic, plus
it will use the virtual input device API from mutter/clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=777342
2017-05-15 14:50:02 +02:00
Florian Müllner
6362b3d057 dateMenu: Fix a runtime warning
GJS now warns about excess parameters, so wrap the queue_relayout()
into an anonymous function instead of using it directly as signal
handler.
2017-05-11 15:20:10 +02:00
Daiki Ueno
0142fae742 search: copy result to clipboard if requested
Some search providers such as GNOME Characters want to copy search
results to clipboard.  However, on Wayland, clipboards are only
accessible from applications that have a visible surface on display.

This patch allows a search provider to request the shell to copy a
search result to clipboard when 'clipboardText' is included in the meta
of the result.

https://bugzilla.gnome.org/show_bug.cgi?id=775099
2017-05-11 11:11:22 +02:00
Mario Sanchez Prada
73680e2433 popupMenu: Change the position of the icon in PopupImageMenuItem
We are moving the icon to be added before the text instead of after,
which is consistent with other menu items in other popup menus, such
as the ones in the system indicator's popup menu.

https://bugzilla.gnome.org/show_bug.cgi?id=782166
2017-05-09 18:32:23 +01:00
Mario Sanchez Prada
e38c26894b popupMenu: Allow specifying an icon on PopupMenuBase.addAction()
This allows passing an optional icon parameter to addAction()
so that a PopupImageMenuItem instance is created instead of a
PopupMenuItem if an icon is specified.

https://bugzilla.gnome.org/show_bug.cgi?id=782166
2017-05-09 18:32:23 +01:00
Mario Sanchez Prada
28ca96064b popupMenu: Accept either an icon name or a GIcon on PopupImageMenuItem
Add an extra check to setIcon() so that either a GIcon or an string
with the icon's name is handlded, so that we can create menu items
in different ways (e.g. by passing a GIcon created from a resource).

https://bugzilla.gnome.org/show_bug.cgi?id=782166
2017-05-09 18:32:23 +01:00
Emilio Pozuelo Monfort
ff425d1db7 extensionSystem: handle reloading broken extensions
Some extensions out there may fail to reload. When that happens,
we need to catch any exceptions so that we don't leave things in
a broken state that could lead to leaving extensions enabled in
the screen shield.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-04-25 17:47:08 +02:00
Florian Müllner
243dae14ea background: Fix file check
The _animationFile property was removed in commit 8a4c862633 ...
2017-04-11 02:43:07 +02:00
Carlos Soriano
2cce1b9ea0 appFavorites: Rename gnome-music.desktop
Recently Music gained a flatpak manifest inside the repo in bug 779905.
However that requires the desktop file to be properly named like
DBUS addresses are.

This patch renames the old Music desktop file to the new one.

https://bugzilla.gnome.org/show_bug.cgi?id=780157
2017-04-09 11:04:40 +02:00
Jonas Ådahl
4cd4678194 Add ShowMonitorLabels2 D-Bus API
Add a new D-Bus method for setting the monitor labels. This new method
takes connector names instead of output ids for associating with actual
monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-04-07 22:30:35 +08:00
Cosimo Cecchi
cad5e06041 panelMenu: consider scale factor when setting max-height
Since the workarea and margins are both in pysical pixels dimensions (we
fetch margins from Clutter, not from the theme), but the CSS expects
logical (scaled) pixels, unless we consider the scale factor when
setting max-height, it won't work on a HiDpi display.

This fixes missing scrollbars when the calendar popup is full on HiDpi
displays.

https://bugzilla.gnome.org/show_bug.cgi?id=753305
2017-04-06 18:32:04 -07:00
Florian Müllner
647c8df12f popupMenu: Don't handle key events for insensitive source
Generalizing menu toggling via keyboard in commit 1d58ea25ab
fixed keynav in many places, but it turns out that it also adds
unexpected interactions in some cases where the source is not
button-like, as for example the entry context menus provided by
ShellEntry. Commit e33c68a415 fixed one case, however it is still
possible for plain enter/space to unexpectedly trigger the menu
if the entry itself doesn't consume the event, which is the case
when ClutterText:editable is false. However for a general fix, it
makes more sense to consider the source actor's :reactive property
and disable toggling menus via keyboard when they cannot be toggled
by pointer either - expecting non-editable entries to be non-reactive
as well seems like a reasonable assumption, and indeed all our code
follows that pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=758873
2017-04-04 20:58:50 +02:00
Carlos Garnacho
257b99ebd1 viewSelector: Set correct arguments on ShowOverviewAction 'activate' signal
It's missing the double argument containing the scale change.
2017-03-21 17:53:36 +00:00
Cosimo Cecchi
6f473a4f29 network: don't assume the connection path is always non-NULL
It can be NULL according to the libnm-glib documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=780321
2017-03-20 18:43:50 +00:00
Carlos Garnacho
35d0ba4454 status/a11y: Fix typo
The idle ID being set and being checked didn't quite match up.
2017-03-20 18:16:56 +00:00
Florian Müllner
9cc1e6b85c location: Split out PermissionStore
It doesn't make sense to tie the proxy code for flatpak's permission
store to the location indicator, just because that was the first
component to use it, so split it into a separate module.

https://bugzilla.gnome.org/show_bug.cgi?id=780252
2017-03-20 19:02:08 +01:00
Florian Müllner
d393ca4f09 weather: Track whether a location was set
Setting GWeatherInfo:location to null helpfully doesn't mean
"no location", but "NYC". This obviously isn't what we want
to show users, so track the location validity separately and
consider it when updating the label shown to users.

https://bugzilla.gnome.org/show_bug.cgi?id=780252
2017-03-20 19:02:08 +01:00
Florian Müllner
a786f0bcd2 screenShield: Do not take an inhibitor when disabled by lockdown
Just as with the normal lock screen settings, we shouldn't request
a logind inhibitor when locking is disabled via lockdown settings.

https://bugzilla.gnome.org/show_bug.cgi?id=780212
2017-03-20 19:02:08 +01:00
Florian Müllner
199bc85bce screenShield: Do not lock the screen when locked down
When using the 'disable-lock-screen' setting to lock down the screen
lock, the expectation is that users cannot lock the screen. However
as it turns out, all the setting currently does is hiding the lock
button in the system menu and making the lock settings in the privacy
panel inactive. That means that if the 'lock-screen-enabled' setting
isn't disabled and locked down as well, we will just continue to
lock the screen on inactivity - not to mention the keyboard shortcut
that isn't subject to that setting anyway.

Instead of expecting administrators to hunt down every possible way
of locking the screen and disabling it individually, we can easily
handle all cases by refusing to lock the screen when disabled by the
lockdown settings.

https://bugzilla.gnome.org/show_bug.cgi?id=780212
2017-03-20 19:02:08 +01:00
Florian Müllner
d15b46f5cb workspace: Hide preview overlays from picks
Dragging and dropping app icons is expected to work anywhere over a
workspace, however overlaid elements are added to a separate hierarchy
and can thus block valid drop targets. This wasn't much of an issue
while we had just the window title, but since the addition of the
focus border, drops on window previews stopped working entirely.

Fix this by hiding all non-reactive overlay elements from picks.

https://bugzilla.gnome.org/show_bug.cgi?id=737166
2017-03-20 19:02:07 +01:00
Florian Müllner
f97a3522e5 network: Close Wifi selection dialog when appropriate
Currently when the wifi selection dialog is open when the screen lock is
activated, the dialog remains visible above the shield. This is clearly
broken, so close the dialog automatically on session mode changes if the
mode doesn't allow settings (as changing the access point is arguably a
user setting).

https://bugzilla.gnome.org/show_bug.cgi?id=780054
2017-03-20 19:02:07 +01:00
Florian Müllner
09af4433b0 windowMenu: Remove left-over variable 2017-03-14 17:47:04 +01:00
Florian Müllner
60a2794c8b messageTray: Ignore showBanners policy for critical notifications
The critical hint is meant to be used for notifications that must not
be missed - running out of battery being the prime example - so it
makes sense to ignore the policy in that case and make sure to always
show them to the user. This is consistent with blocking normal
notifications while showing a fullscreen window, but letting critical
ones through.

https://bugzilla.gnome.org/show_bug.cgi?id=779974
2017-03-14 00:23:37 +01:00
Carlos Garnacho
e039871298 padOsd: Allow to switch between pads in the same group
Whenever there's more than one pad in the same group (eg. Wacom ExpressKey
Remotes), show a popdown menu to allow configuring those extra pads.
Devices are hot-pluggable, so the popdown menu will update its state
whenever pads are added/removed.

Also, allow to quickly change between pads by switching to its OSD by
just interacting with them. Always given they are in the same group.

https://bugzilla.gnome.org/show_bug.cgi?id=779986
2017-03-13 21:23:04 +01:00
Carlos Garnacho
e057333bf3 padOsd: Add PadChooser class
This is a popdown button that allows choosing between pads in
the same group.

https://bugzilla.gnome.org/show_bug.cgi?id=779986
2017-03-13 21:23:04 +01:00
Carlos Garnacho
e0c0d9223e padOsd: shuffle title labels hierarchy
Add some boxes in between, so we can add the pad chooser button
and the overall result is still centered.

https://bugzilla.gnome.org/show_bug.cgi?id=779986
2017-03-13 21:22:43 +01:00
Carlos Garnacho
ada21c975f padOsd: peek pads attached to the same tablet
https://bugzilla.gnome.org/show_bug.cgi?id=779986
2017-03-13 16:34:27 +01:00
Florian Müllner
b4df747464 telepathyClient: Gracefully handle missing telepathy deps
Telepathy's role has been diminishing continuously over the last
couple of years, so while chat integration is a nice feature for
those who use it, it is hard to justify keeping it as a hard
dependency. To address this, split out the component from the
client so we can handle missing typelibs gracefully by not
providing any chat integration.

https://bugzilla.gnome.org/show_bug.cgi?id=779878
2017-03-13 16:23:08 +01:00
Florian Müllner
9a38011e1e lookingGlass: Don't include telepathy import by default
It's hardly a common include nowadays, and removing it keeps all
telepathy usage contained in the telepathyClient component.

https://bugzilla.gnome.org/show_bug.cgi?id=779878
2017-03-13 16:23:08 +01:00
Jan-Michael Brummer
3a6b41495a windowManager: Add bottom edge drag gesture to show OSK
Adding a way to manually activate the OSK, in cases where it does not pop up
automatically or has been closed by the user.

https://bugzilla.gnome.org/show_bug.cgi?id=757712
2017-03-12 17:38:17 +01:00
Florian Müllner
742155c384 messageTray: Use correct monitor for fullscreen logic
For most notifications, banners are suppressed while the monitor
that is used to display banners is in fullscreen. With the old
message tray at the bottom, this used to be the bottom-most monitor,
but nowadays it's always the primary one, so update the corresponding
code to use the correct monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=779819
2017-03-10 17:21:54 +01:00
Florian Müllner
7c96b39bef telepathyClient: Implement Tp.BaseClient directly
The telepathy integration was written at a time where gjs didn't
allow to inherit from GObject classes, which is why we needed a
C helper class. This hasn't been the case for a while now, so cut
out the middle man and implement Tp.BaseClient directly.

https://bugzilla.gnome.org/show_bug.cgi?id=771721
2017-03-10 17:02:18 +01:00
Hyungwon Hwang
4b80cbe1cd xdnd: Remove XDnD handling code and receive DnD signals from mutter
Move the XDnD handling code to mutter, and receive DnD handling signals from
mutter directly.

https://bugzilla.gnome.org/show_bug.cgi?id=765003
2017-03-07 08:29:51 +08:00
Hyungwon Hwang
46f3712421 xdnd: Rename XDnD handling signals to more inclusive ones
Rename the signals which have been used to handle XDnd events to more inclusive
ones. So that these signals can be used to handle the DnD events in Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=765003
2017-03-07 08:29:51 +08:00
Florian Müllner
645aa01efd telepathyClient: Use a single update for text and timestamp
Commit c6f22826cf added a call to update() to refresh the notification
time for sent and received messages. However as it omits the bannerMarkup
parameter, escaped text like ''' now makes it through verbatim.
Rather than adding the parameter, we can just refresh the timestamp in
the existing update() call to fix the issue - it means the notification
timestamp is only refreshed for received messages, but that reflects
the text shown in the notification, which isn't updated for sent
messages either.

https://bugzilla.gnome.org/show_bug.cgi?id=779435
2017-03-01 20:46:58 +01:00
Allan Day
252dce1ec2 fix typos
The shell was crashing for me - these fixes from Debarshi seem to
fix it.
2017-03-01 16:24:35 +00:00