Commit Graph

162 Commits

Author SHA1 Message Date
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
Jasper St. Pierre
752aca811c windowManager: Support coords 2014-05-22 10:51:49 -04:00
Jasper St. Pierre
e7af257814 Implement window menus in gnome-shell
https://bugzilla.gnome.org/show_bug.cgi?id=726352
2014-05-17 15:17:29 -04:00
Elad Alfassa
4a6b89d44c windowManager: add switch-to-workspace-last keybinding
When using dynamic workspace, the number of the last workspace may vary,
and it would be nice to have a keybinding to jump directly to it.

https://bugzilla.gnome.org/show_bug.cgi?id=659288
2014-04-16 21:45:14 +02:00
Bastien Nocera
cd2bd7685a js: Name all the timeouts and idles
With very uninventive names. Names now, good names later.

https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 21:08:16 +02:00
Florian Müllner
fcd5f06c09 windowManager: Animate tile previews
With tile previews being implemented as Clutter actors in the shell, we
can now easily add fancy animations when showing/hiding the preview.
Besides looking more polished, the animations also help understanding
what will happen to the window when the drag is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-20 00:29:14 +01:00
Florian Müllner
6d93c8b3fd windowManager: Implement tile previews
Mutter now delegates tile previews to compositor plugins, so
add a simple implementation based on the UI previously provided
by mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-20 00:29:14 +01:00
Florian Müllner
2631f03108 windowManager: Don't remove the active workspace
Currently workspaces (except for the last one) are removed when
they become empty. While we do have special treatment for the
case where the currently active workspace is removed, we just
move directly without animations to the last workspace to avoid
ending up on a "random" workspace. However this behavior is still
a bit confusing, so keep the workspace around instead until the
user decides to move to another one.

https://bugzilla.gnome.org/show_bug.cgi?id=709064
2014-02-19 21:52:52 +01:00
Giovanni Campagna
3a26f7f4d5 WindowManager: WORKAROUND: disable dimming in the overview
Clones and effects don't mix, due to a bug in Clutter we don't
know how to fix, and sometimes the clone is clipped completely.
As a workaround, undim windows with dialogs in the overview.

Clutter bug: https://bugzilla.gnome.org/show_bug.cgi?id=659523

https://bugzilla.gnome.org/show_bug.cgi?id=650843
2014-01-19 16:38:19 +01:00
Giovanni Campagna
587655f063 Workspace: show attached modal dialog
Windows in the overview should be like they appear in the workspace,
including modal dialogs that are attached above them.
In addition, hiding the dialogs in the overview causes a flash as
dialog appears at the end of the transition.

Based on a patch by Maxim Ermilov <zaspire@rambler.ru>

https://bugzilla.gnome.org/show_bug.cgi?id=650843
2014-01-19 16:37:17 +01:00
Jasper St. Pierre
6dcc3d637f windowManager: Fix the name of the keybinding 2014-01-14 17:58:51 -05:00