Commit Graph

172 Commits

Author SHA1 Message Date
Cosimo Cecchi
83e7f6f496 windowManager: fix fullscreen clone being left around
If we get another effect on the same actor, we should make sure to
remove the clone through the "overwrite" methods provided by Tweener, or
there will be a race that might end up with a stray clone being left
around.

https://bugzilla.gnome.org/show_bug.cgi?id=756714
2015-10-16 13:47:14 -07:00
Florian Müllner
1c3ea1649f windowManager: Fix fullscreen animations on dualscreen
The translation should describe the difference between the fullscreened
and unfullscreened position of the window - however we are currently
assuming a fullscreen position of (0, 0) instead of the monitor's origin,
which causes glitches on dualscreen setups.

https://bugzilla.gnome.org/show_bug.cgi?id=756697
2015-10-16 15:50:39 +02:00
Cosimo Cecchi
207c847762 windowManager: add animations for fullscreen and unfullscreen
We use the newly introduced feature from Mutter to hook up our own
fullscreen and unfullscreen animations.
To give the illusion of a transition as smooth as possible, we create a
snapshot of the current contents of the actor before its state is
changed, and crossfade between the two states while the size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=707248
2015-10-14 12:10:58 -04:00
Carlos Soriano
0722c06275 modalDialog: Match gtk+ buttons style
Follow the design we have in gtk+ for buttons dialogs,
which are at the bottom and they expand full width, having
the same amount of space for each one.

Also, since this removes any space for non-button widgets
in the button area, move the spinner present in the auth prompt
dialog next to the password entry.

https://bugzilla.gnome.org/show_bug.cgi?id=746108
2015-08-05 14:44:47 +02:00
Carlos Garnacho
f3ecfab378 windowManager: Add TouchpadWorkspaceSwitchAction
This object (not really a Clutter.GestureAction) sets up a captured-event
handler, which exclusively looks for 4 finger touchpad swipes, emitting
an ::activated signal under the same terms than WorkspaceSwitchAction.

https://bugzilla.gnome.org/show_bug.cgi?id=752250
2015-07-22 21:19:51 +02:00
Carlos Garnacho
804563d5b2 windowManager: refactor WorkspaceSwitchAction callback into separate function
This will be used by the touchpad-specific "action" too, so put it in a
shared place.

https://bugzilla.gnome.org/show_bug.cgi?id=752250
2015-07-22 21:19:33 +02:00
Jasper St. Pierre
fe265554a7 windowManager: Connect to size-changed signal
Whoops, forgot this one.
2015-07-05 23:10:51 -07:00
Jasper St. Pierre
7305466765 Adapt to new size-change API
We don't implement any maximize transitions (yet??), but we still have
the skeleton there. Let's keep it up to date.
2015-07-05 23:09:24 -07:00
Florian Müllner
dfc4cc4aaf windowManager: Handle missing overrides settings
shell_global_get_overrides_settings() may return %NULL in case of
custom shell modes (i.e. not the default and classic ones); while
this is not officially encouraged, we should still handle it rather
than throw an error.

https://bugzilla.gnome.org/show_bug.cgi?id=751921
2015-07-03 22:25:29 +02:00
Florian Müllner
530193a3a2 windowManager: Replace deprecated g_settings_list_keys() 2015-06-19 14:05:32 +02:00
Carlos Garnacho
03dbb0f931 windowManager: Redo WorkspaceSwitchAction to be a Clutter.SwipeAction
Just reuse this gesture rather than implementing edge detection ourselves.
As a plus, we might get touchpad swipe support when Clutter handles it.

https://bugzilla.gnome.org/show_bug.cgi?id=749742
2015-05-26 19:06:45 +02:00
Adel Gadllah
d24abab4a8 Revert "Revert "windowManager: Block dynamic workspace updates while showing the popup""
This was an accident.

This reverts commit 5e26d0c90c.
2015-03-27 14:34:28 +01:00
Adel Gadllah
5e26d0c90c Revert "windowManager: Block dynamic workspace updates while showing the popup"
This reverts commit aeb971c33a.

https://bugzilla.gnome.org/show_bug.cgi?id=720885
2015-03-27 14:32:27 +01:00
Shivam Mishra
aeb971c33a windowManager: Block dynamic workspace updates while showing the popup
Pause dynamic workspace management while workspaceSwitcherPopup
is shown so as to eliminate infinite creation and destruction of
workspaces, thus preventing stuttering while trying to move a
window to last workspace.
Add _isWorkspacePrepended flag to make sure only a single workspace
is prepended at a time thus preventing the possibility of prepending
infinite workspaces while dynamic workspace management is on pause.
Prepend a new workspace by creating a new workspace instead of only
shifting the windows to next workspace so that the workspaceSwitcherPopup
may appear in sync with what's happening behind the scene and display
correct number of workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=712778
2015-03-27 14:13:27 +01:00
Florian Müllner
14da6b68dc windowManager: Don't allow move-to-workspace for always-sticky windows
"Moving" a window to another workspace doesn't make sense when it cannot
be unstuck, and is potentially confusing if a new workspace is added at
the start/end - just don't do anything in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=746782
2015-03-26 12:19:33 +01:00
Jakub Steiner
83e5ea4827 Revert "theme: use a global headline class"
This reverts commit 5915348396.
2015-03-10 18:27:43 +01:00
Jakub Steiner
5915348396 theme: use a global headline class
https://bugzilla.gnome.org/show_bug.cgi?id=745687
2015-03-10 17:45:04 +01:00
Florian Müllner
8aa1765f24 windowManager: Allow toggle-message-tray action in overview
The corresponding action mode was dropped accidentally in commit 08d2e61
when changing the shortcut to open the calendar drop-down instead.
2015-03-06 18:07:19 +01:00
Florian Müllner
c9bcb411fc windowManager: Add unminimize effect
The effect was added to mutter a while ago, but never implemented
in the shell. Just do the reverse of the minimize animation ...

https://bugzilla.gnome.org/show_bug.cgi?id=702662
2015-02-27 13:02:19 +01:00
Florian Müllner
530e8273ff Adjust for renamed action mode
Commit c79d24b60e renamed the TOPBAR_POPUP mode to POPUP to
reflect its new usage, but did not update any code that used it.
Whoops.
2015-02-26 01:06:03 +01:00
Florian Müllner
08d2e617e1 windowManager: Take over <super>m keybinding to toggle calendar
It's where all the fun is happening nowadays ...

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:39:59 +01:00
Ray Strode
a71ab9abb2 gdm: allow user to switch VTs 8 through 12
mutter now supports keybindings for VTs 8 through 12.

This commit makes them work from the login screen.

https://bugzilla.gnome.org/show_bug.cgi?id=744800
2015-02-19 16:44:39 -05:00
Ray Strode
5cddab3305 gdm: allow user to switch VTs using ctrl-alt-f[1-7]
Users currently can't switch VTs while at the login screen.

This commit fixes that, by adding the relevant keybindings
to the login screen's allowed keybindings list.

https://bugzilla.gnome.org/show_bug.cgi?id=744800
2015-02-19 14:50:03 -05:00
Florian Müllner
4bf53cd507 windowManager: Kill a comment
The code described by the comment was moved away in commit eda27d51,
so it is not misleading at best. It wasn't too useful to begin with,
so kill it off rather than moving it to the correct place ...
2015-01-21 15:44:05 +01:00
Florian Müllner
ce35d523a2 windowManager: Allow moving a window above the top workspace
When using dynamic workspaces, a new workspace will be appended
when moving a window down to the last (empty) workspace. It makes
sense to extend the behavior in the opposite direction, and prepend
a new workspace when moving a window up from the first workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=665764
2015-01-16 19:28:57 +01:00
Florian Müllner
0bfaa5c6a3 windowManager: Update active workspace after inserting a new one
New workspaces are inserted by shifting all windows on workspaces
below the insertion position down. As a result, when the new
workspace is inserted before the active one, we end up with
the illusion of a workspace switch. Instead, activate the workspace
on which the windows from the active one ended up.

https://bugzilla.gnome.org/show_bug.cgi?id=665764
2015-01-16 19:28:56 +01:00
Florian Müllner
67ec1e5519 windowManager: Don't shift OR windows when inserting a workspace
We are not supposed to mess around with OR windows, so don't try
to shift them to a different workspace. This fixes a warning with
newer versions of mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=665764
2015-01-16 19:28:56 +01:00
Florian Müllner
cc05d303d8 windowManager: Split out workspace insertion from thumbnails
We will soon allow to insert a new workspace by other means than
DND in between workspace thumbnails, so move the relevant code
to a new windowManager method.

https://bugzilla.gnome.org/show_bug.cgi?id=665764
2015-01-16 19:28:56 +01:00
Jasper St. Pierre
897144baba windowManager: Make sure to reset the resizePopup after using it
So that we'll recreate it the next time we want to show it. Otherwise,
we'll try to call things on a half-destroyed ResizePopup and end up
causing errors instead of showing the user their resize popup.
2015-01-02 09:33:20 -08:00
Jasper St. Pierre
3291281957 windowManager: Implement the resize popup here
mutter recently removed its implementation, so add a simple one here.
2014-12-29 17:46:37 -08:00
Florian Müllner
0257a23c31 windowManager: Update stacking during workspace switches
When animating workspace switches, windows on the old and new workspaces
are temporarily reparented. If windows are restacked, those windows will
thus be ignored by mutter until meta_switch_workspace_completed() resyncs
the stacking at the end of the animation.
As a result, activating a window on another workspace that is not on top
of the stack is very noticeably a two-step operation of switching workspace
and raising the window. There is a technical reason for that order[0], but
we can avoid the visible disruption by manually syncing the stack during
the switch operation.

[0] https://git.gnome.org/browse/mutter/tree/src/core/workspace.c#n590

https://bugzilla.gnome.org/show_bug.cgi?id=741680
2014-12-19 11:39:50 +01:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Florian Müllner
ddeac2386f gestures: Restrict actions based on keybindingMode
Just like keybindings and the message tray pointer barrier, gestures
don't always make sense - for instance, swiping up the screen shield
should not trigger the message tray just as the SelectArea action around
the left edge should not open the overview.
To avoid this, restrict gestures based on the current keybinding mode.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Florian Müllner
2b9645b268 Use MetaWindow.get_frame_rect()
get_outer_rect() has been deprecated for a while, use the new
function instead.
2014-10-09 12:17:15 +02:00
Carlos Garnacho
215eb5c65f windowManager: limit the "switch app" gesture to !overview.visible
This gesture only makes sense to be triggered outside the overview, when
dealing with application windows themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=736110
2014-09-06 00:50:00 +02:00
Jasper St. Pierre
5faef316b8 Revert "wobbly"
This reverts commit 6751ca4c18.

As fun as it is, I don't think we want this by default.
2014-09-05 14:51:01 -07:00
Jasper St. Pierre
6751ca4c18 wobbly 2014-09-05 14:37:18 -07:00
Christophe Fergeau
c459ef6888 Use new meta_key_binding_is_reversed() method
Now that mutter gives a way to check if a MetaKeyBinding was marked as
'reversed' or not, gnome-shell does not have to hardcode that a
MetaKeyBinding using a shift modifier is reversed, it can directly check
if the appropriate flag is set.

https://bugzilla.gnome.org/show_bug.cgi?id=732296
2014-08-17 19:33:22 +02:00
Jasper St. Pierre
72a663f554 windowManager: Fix destroy animation
Guess who didn't test his destroy animation that he pushed without any
review!!! It wasn't me!
2014-08-03 15:30:06 -04:00
Giovanni Campagna
aa2fc3c858 WindowManager: update animation timings after designer review
Lapo, Jakub and Allan all agree with this.

https://bugzilla.gnome.org/show_bug.cgi?id=732857
2014-07-29 14:55:51 +02:00
Giovanni Campagna
d4f0b5bdf3 WindowManager: improve destroy window animation
The animation is the same for modal dialogs, but it is now
run for non modal dialogs too (matching the new behavior on
show).
In addition, we run a destroy animation for normal windows,
if they use CSD (there are technical limitations that prevent
running animations after destroy on server decorated windows)

https://bugzilla.gnome.org/show_bug.cgi?id=732857
2014-07-29 14:55:48 +02:00
Giovanni Campagna
eda27d5194 WindowManager: improve minimize/map animations
Using the parameters from Elementary's Gala, which is generally
considered a DE that cares about eye-candy.

https://bugzilla.gnome.org/show_bug.cgi?id=732857
2014-07-29 14:53:28 +02:00
Carlos Garnacho
e41879a5c4 windowManager: Switch the focused application on 3-finger hold + tap
The gesture action only cycles through the applications in the current
workspace.
2014-07-08 12:06:14 -04:00
Carlos Garnacho
24dc926660 windowManager: Switch workspaces on 4-finger drag
The workspace to switch is obtained from the direction received
by the WorkspaceSwitchAction gesture.
2014-07-08 12:06:14 -04:00
Jasper St. Pierre
d850c8599e windowManager: Don't use ClutterActor.scale-gravity
It's deprecated as well.
2014-06-27 10:54:11 -04:00
Jasper St. Pierre
83cb26d70e js: Adapt to GSettings API change
The 'schema' property has been deprecated for a long time. Even though
this will likely be reverted in glib, let's stop using it.
2014-06-24 15:17:09 -04:00
Florian Müllner
ae2751a68b main: Move pref overrides back into C
Commit 6c2f3d1d17 moved pref overrides into JS to implement
session mode specific overrides in a clean and generic way.
However that approach comes with a cost - doing the overrides only
after having handled over control to JS means that the core will
be initialized with the non-overridden settings before changing
to the correct values. In the best case this is unnecessary work,
but it can in fact have a worse effect: when initializing workspaces,
we will restore the previous number of workspaces when using
dynamic-workspaces and reset to the configured number otherwise.
As the non-overridden default for dynamic-workspaces is FALSE, we
can easily end up moving the user's windows to the "wrong" workspace.

Now GSettings is expected to grow support for session specific defaults,
which will render our entire override system obsolete (yay!). Given
that, it seems acceptable to use a less generic (and uglier) approach
in the meanwhile, in order to fix aforementioned problems. So move
overrides back before core initialization and just hardcode the
session-mode => override-schema relation.

https://bugzilla.gnome.org/show_bug.cgi?id=695487
2014-06-09 21:52:03 +02:00
Florian Müllner
5b61f2d642 windowMenu: Implement new show_menu_for_rect() hook
Having the full geometry of the menu's source button (if any) will
allow us to address several misbehaviors of window menus, so use
that instead of show_menu().

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:48:53 +02:00
Florian Müllner
2b365627ed windowManager: Remove (un)blockAnimations()
They are no longer used, kill them.
2014-05-28 22:01:53 +02:00
Florian Müllner
8811ba2ec0 Support (fallback) app menu in SSD
We now allow "appmenu" in the button layout to make synchronizing it
with GTK+'s client-side decorations easier, but as some people tweak
their settings to get in-window app menus even when using the shell,
actually pop up the app menu when the button is activated.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:49:05 +02:00