Commit Graph

354 Commits

Author SHA1 Message Date
Florian Müllner
5a414fff44 windowManager: Remove excess parameter
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
Rui Matos
b35dfc8914 windowManager: Add a switcher for mutter's switch-monitor keybinding
https://bugzilla.gnome.org/show_bug.cgi?id=783550
2017-08-22 10:50:56 +02:00
Florian Müllner
dff3e4e0b9 ui: Add InhibitShortcutsDialog
https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:27:42 +01:00
Cosimo Cecchi
c1e478eb53 windowManager: use Meta.MonitorManager.get_display_configuration_timeout()
Instead of hardcoding a 20 seconds limit.

https://bugzilla.gnome.org/show_bug.cgi?id=767805
2017-07-31 15:37:34 +01:00
Florian Müllner
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Carlos Garnacho
d220e353e0 ui: Implement "window doesn't respond" dialog on gnome-shell
This does allow us to use ClutterActors instead of lousy legacy tools
meant for shell scripting.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 19:28:57 +02:00
Florian Müllner
593b4318a3 ui: Use MessageDialogContent where appropriate
The gros of our ModalDialogs follow a UI pattern that matches the
newly added widget, so port them over to cut down on duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
2017-07-16 18:15:00 +02:00
Florian Müllner
32fdc22811 windowManager: Fix a warning
The destroy effect currently relies on a monkey-patched property
added from the map effect. However on X11 it is possible that we
did no map animation for a window that is destroyed when the shell
was restarted or had taken over from another WM. Just use the real
MetaWindow property to avoid a warning in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +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
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
Piotr Drąg
649d360289 Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772210
2017-02-16 02:07:14 +01:00
Florian Müllner
e08f2a4a04 Don't mix GJS and GObject signal systems
GJS implements a basic signal system that allows monkey-patching
JS objects with signal methods resembling the GObject ones. However
it's clearly not a good idea to replace the actual GObject methods,
so use the proper GObject facilities when inheriting from GObject.

https://bugzilla.gnome.org/show_bug.cgi?id=778660
2017-02-15 23:20:14 +01:00
Carlos Garnacho
0008ef70e1 windowManager: Use g-s-d wacom dbus helpers to update pad leds/oleds
This keeps feedback on the device itself in sync with the overall pad
state, a feature we had previously through g-s-d.

https://bugzilla.gnome.org/show_bug.cgi?id=776543
2017-02-10 23:55:04 +01:00
Carlos Garnacho
c3cdbd0dac windowManager: Handle MetaDisplay::show-osd signal
Propagate as-is to the OsdWindowManager.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 23:55:04 +01:00
Carlos Garnacho
e0d7d28c20 windowManager: Avoid fullscreen animation if the window has no texture
There is hardly anything to animate, so just avoid the animation in this
case.

https://bugzilla.gnome.org/show_bug.cgi?id=777784
2017-01-26 17:51:39 +01:00
Carlos Garnacho
a82c564a73 windowManager: Avoid reentrancy on the ::size-changed handler
We have no guarantees on the number of ::size-changed signals that we may
receive, so the _sizeChangedWindow handler may run multiple times, which
leads to multiple calls to meta_plugin_size_change_completed(). So double
check the actor is not already being animated in the _sizeChangedWindow
handler to avoid reentrancy.

https://bugzilla.gnome.org/show_bug.cgi?id=777784
2017-01-26 17:51:39 +01:00
Rui Matos
3d6bf43649 windowManager: Handle fullscreening from zero sized windows
Wayland clients can request their surfaces to be fullscreened before
commiting a buffer which means that we need to handle fullscreen
requests for which the old size is 0x0, preferably without warnings.

Since the mapping animation also runs for these windows, we can simply
bail out and ignore the fullscreen size change.

https://bugzilla.gnome.org/show_bug.cgi?id=770345
2016-11-23 18:43:11 +01:00
Rui Matos
7bc1d57ad7 windowManager: Fix fullscreen animations of wayland clients
Wayland clients are in control of their window size so the existing
mutter plugin API, which assumes size changes are synchronous, doesn't
work for them since when our size-change handler runs the MetaWindow's
size isn't final yet.

To fix this, the mutter plugin API was extended with a size-changed
vfunc that lets us know when the MetaWindow size has actually
changed. This way we can make the window snapshot and get the old
window size on the existing size-change handler and later, on the new
size-changed handler, get the new size and start the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=770345
2016-11-23 18:43:07 +01:00
Carlos Garnacho
7e5274619a windowManager: Update API call
This function has now a more generic name, so it caters for both
swipe and pinch touchpad gestures.

https://bugzilla.gnome.org/show_bug.cgi?id=765937
2016-11-04 16:35:11 +01:00
Carlos Garnacho
e006b9b400 ui: Add PadOsd
This is an implementation of the pad OSD that's been previously
present in gnome-settings-daemon. Since things are moving closer
to the compositor, it makes sense to have this implemented as shell
UI.

https://bugzilla.gnome.org/show_bug.cgi?id=771067
2016-11-04 16:08:10 +01: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
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
bf8d30603e windowManager: Avoid code duplication
The various switcher keybindings are handled identically, except for
the popup that is shown; update the code to reflect that instead of
duplicating the code again and again.

https://bugzilla.gnome.org/show_bug.cgi?id=730739
2016-05-19 17:34:00 +02:00
Florian Müllner
bd6e7f14d1 altTab: Take over cycle-windows/cycle-group keybindings
The code to handle cycling through windows without showing a popup
was removed from mutter a while ago, which left the corresponding
keybindings mostly broken (i.e. they now only switch between two
windows). With the various switch-foo keybindings handled by the
shell, it is now easier to take over the cycle-foo keybindings as
well.

https://bugzilla.gnome.org/show_bug.cgi?id=730739
2016-05-19 17:34:00 +02:00
Florian Müllner
d8960b396b windowManager: Only animate dimming changes when necessary
Now that we no longer skip dimming/undimming windows while showing
the overview, we can still save a bit of work by changing the dimming
without animation while the window is hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=762475
2016-02-22 19:42:57 +01:00
Florian Müllner
4c29604e1e windowManager: Always check dimming when an attached modal opens/closes
We skip window animations while the overview is shown (and the window
group is hidden) to avoid unnecessary work. However when an attached
modal dialog is opened or closed, this involves checking whether the
parent window should be dimmed - skipping that test means that we can
simply fail to dim or undim a window altogether, so do that check
unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=762475
2016-02-22 19:42:57 +01:00
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
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
Jasper St. Pierre
9bb4d17e31 Add a debug keybinding to pause/resume all tweens
So we can inspect a mid-tween scene easier.
2014-01-14 17:25:14 -05:00
Jasper St. Pierre
7fcae1e974 Remove use of superfluous MetaWindowActor APIs 2013-12-16 12:48:53 -05:00
Florian Müllner
751a3f0e94 js: Use SOURCE_CONTINUE/SOURCE_REMOVE constants in source functions
With support for boolean constants in g-i, we can finally use the
more readable constants instead of true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
39afb58472 windowManager: Don't open overview after closing the last window on a workspace
Activating the overview is fairly easy (hot corner, <super>), so doing it
automatically after closing the last window on a workspace does not save
a lot of effort; it does result in a surprising context switch when the
user does not expect the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=662581
2013-08-31 23:53:39 +02:00
Giovanni Campagna
02224bb5fe Add a confirmation dialog for display changes
Unfortunately, display configuration can and does fail, due
to unspecified HW constraints, drivers bugs, unsupported exotic
configurations or just bad luck.
So when the user makes a change in the control center, show
a dialog asking him if it looks OK, and revert back after 20 seconds
otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=706208
2013-08-20 12:03:13 +02:00
Jasper St. Pierre
ed178b702f windowManager: Actually respect hasWorkspaces
We've long had the hasWorkspaces property, but it doesn't seem like
it was ever used. Implement it so that we don't have workspaces in
initial-setup mode.

Since it's difficult to make it change at runtime with a decent set
of semantics, and we never expect that to happen, don't bother
implementing it dynamically.

https://bugzilla.gnome.org/show_bug.cgi?id=698593
2013-07-18 18:04:15 -04:00
Jasper St. Pierre
5dabaf2fe9 Fix launching apps / search results in new workspaces by dragging
When I landed the new workspace tracker move, I didn't realize there
was public API being used by clients here. Add that back.

https://bugzilla.gnome.org/show_bug.cgi?id=698593
2013-07-01 13:22:05 -04:00
Florian Müllner
5cd913a527 windowManager: Use the correct schema for 'dynamic-workspaces'
We currently monitor the shell's override schema for changes to
the 'dynamic-workspaces' key, which ends up being the wrong
schema in classic mode. With the new ability to use mode-specific
overides, we can finally fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=701717
2013-06-07 19:52:10 +02:00
Jasper St. Pierre
54a9592e19 main: Override the workspace layout in WindowManager
https://bugzilla.gnome.org/show_bug.cgi?id=691746
2013-05-20 13:20:21 -04:00
Jasper St. Pierre
b2aa29e221 main: Move workspace tracking code to WindowManager
https://bugzilla.gnome.org/show_bug.cgi?id=691746
2013-05-20 13:20:21 -04:00
Elad Alfassa
8727661c1c WindowManager: Show switcher popup for switch-to-workspace-n keybindings
Currently we show the workspace popup for relative targets ("up", "down"),
but not when targetting a specific workspace directly.
There is not really a good reason for that difference, and as we are about
to introduce a new shortcut to target the last workspace (which does vary
with dynamic workspaces), it makes sense to unify the behavior and always
show the switcher.

https://bugzilla.gnome.org/show_bug.cgi?id=659288
2013-05-18 20:12:49 +02:00
Florian Müllner
62760d5b2d windowManager: Enable switch-to-workspace-n keybindings in overview
Those keybindings are unassigned by default, but that's not a valid
reason they shouldn't work like the related switch-up/down bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=649977
2013-05-16 00:40:11 +02:00
Florian Müllner
60cb1ad7c5 panel: Change openAppMenu() to a toggle action
It makes sense to allow closing the app menu with the same shortcut
that is used to open it, so make it a toggle action and allow it
TOPBAR_POPUP mode.

https://bugzilla.gnome.org/show_bug.cgi?id=686756
2013-04-26 17:32:54 +02:00
Adel Gadllah
9f3afdf928 windowManager: Don't use show_all
It is deprecated and does not make sense there anyway, so use show() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694441
2013-02-22 14:28:58 +01:00
Adel Gadllah
627a2412d2 ui: Don't use Clutter.Group
It is deprecated use Clutter.Actor instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694441
2013-02-22 14:28:58 +01:00
Adel Gadllah
049695b914 Minimize fullscreen windows when they end up in the background
Alt-Tab away from a monitor sized on the primary monitor results into the top
panel being displayed on top of the window which looks very bad.

So just hide those windows by minimizing them.

The icon geometry animation does not really make sense for fullscreen windows
so just fade them out.

https://bugzilla.gnome.org/show_bug.cgi?id=693991
2013-02-18 19:30:56 +01:00
Jasper St. Pierre
3205d1e16a windowManager: Fix fallback path for icon_geometry animation
It doesn't seem like this code was ever tested.

https://bugzilla.gnome.org/show_bug.cgi?id=694052
2013-02-17 18:57:42 -05:00
Hashem Nasarat
dec0baa147 Remove gap between windows when switching workspaces
Previously there was a distracting gap between workspaces with two full-screen
applications.

https://bugzilla.gnome.org/show_bug.cgi?id=685849
2013-02-17 21:05:55 +01:00
Jasper St. Pierre
d9b33e01ee layout: Replace uses of find(Monitor|Index)ForWindow with window.get_monitor()
Mutter already does the math for us, so we shouldn't have to do it.
2013-02-06 22:35:10 -05:00
Florian Müllner
b682c8e052 main: Move KeybindingMode into Shell
Having the definition in C instead of Javascript allows sharing
the corresponding header with gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-02-04 16:48:40 +01:00
Florian Müllner
89a49ce72e windowManager: Respect icon geometry when minimizing
When using a dock or window-list with the shell, it makes sense for
us to minimize to the location requested rather than the activities
button.

https://bugzilla.gnome.org/show_bug.cgi?id=692997
2013-02-01 17:38:33 +01:00
Rui Matos
b7678493f9 windowManager: Return the KeyBindingAction value from addKeybinding()
meta_display_add_keybinding() returns a keybinding action ID for
dynamically registered keybindings which can be used to match a
keycode/mask pair to the action it is bound to.

https://bugzilla.gnome.org/show_bug.cgi?id=682315
2012-12-17 11:43:01 +00:00
Giovanni Campagna
1256af7b9a WindowManager: scale windows to their monitor's corner on minimize
We previously scaled windows to (primary.x, 0), which is wrong if the
primary monitor is not at y == 0. At the same time, change the policy
to pick the hot corner on the monitor the window is on, because that's
closest to where it will appear in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=690241
2012-12-16 22:40:33 +01:00
Giovanni Campagna
15063ef3d5 WindowManager: clean up scale_y when overwrite the map animation
If we overwrite a map animation (for example because the actor is now destroyed),
we need to complete it first, otherwise it starts off from a random
middle point. This is the same treatment opacity gets for normal windows.

https://bugzilla.gnome.org/show_bug.cgi?id=690241
2012-12-16 20:45:43 +01:00
Giovanni Campagna
3b8a125732 WindowManager: clean up effects code
Use consistently shouldAnimateActor(), and try to have a uniform code flow
between the modal dialog and the normal case.

https://bugzilla.gnome.org/show_bug.cgi?id=690241
2012-12-16 20:45:43 +01:00
Florian Müllner
e725f8a0fe altTab: Re-implement 'switch-windows' keybinding
Now that we use the new 'switch-applications' keybinding for the
application-based alt-tab popup, we can use the 'switch-windows'
keybinding for a more traditional switcher.

Based heavily on the alternate-tab extension from Giovanni Campagna.

https://bugzilla.gnome.org/show_bug.cgi?id=688913
2012-12-05 18:42:08 +01:00
Florian Müllner
aba46720c0 altTab: Rename AltTabPopup to AppSwitcherPopup
We will add support for a window-based popup in addition to the
current application-based one, so use a more descriptive name.

https://bugzilla.gnome.org/show_bug.cgi?id=688913
2012-12-05 18:42:08 +01:00
Florian Müllner
2fb1d707fe altTab: Use 'switch-applications' for app switcher
The Shell's alt-tab popup is application-based, so using the
'switch-windows' keybinding for it never really made sense.
Use the newly added 'switch-applications' keybinding instead.

https://bugzilla.gnome.org/show_bug.cgi?id=688913
2012-12-05 18:42:07 +01:00
Rui Matos
cd58f9f9e5 windowManager: Make use of the switch-panels-backward keybinding
We have it in the schema so there's no reason for it not to work.

https://bugzilla.gnome.org/show_bug.cgi?id=689528
2012-12-04 10:06:37 +01:00
Rui Matos
00338bbc4b switcherPopup: Factor out altTab and ctrlAltTab's common code
https://bugzilla.gnome.org/show_bug.cgi?id=689528
2012-12-04 10:06:37 +01:00
Florian Müllner
28b559e812 windowManager: Replace sessionMode.allowKeybindingsWhenModal
The original condition the property was based on was added to make
the a11y switcher available in the login screen, though it did never
work properly - after popping up the switcher, additional tab key
presses were ignored. As we are now able to filter bindings much more
selectively, we can simplify the check and drop the sessionMode property.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:52:51 +01:00
Florian Müllner
76d776245b windowManager: Use generic filter mechanism for all keybindings
With the new flexible system in place, there's no point explicitly
hardcoding some built-in keybindings; just use the generic mechanism
for everything.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:52:51 +01:00
Florian Müllner
0d9f70492e windowManager: Add a generic mechanism for filtering keybindings
Currently we hardcode the set of keybindings that are available in the
overview; add a generic mechanism to specify in which KeybindingModes
a keybinding should be available.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:52:51 +01:00
Florian Müllner
034408971d windowManager: Implement keybinding_filter hook
We are currently using a hack to allow a select set of keybindings
in the overview. Implement the new MetaPlugin keybinding_filter
hook, which provides a cleaner way to achieve the same.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Jasper St. Pierre
f8805e8311 windowManager: Disable the window dimmer when we close all attached dialogs
This saves some GLSL resources and an FBO.

https://bugzilla.gnome.org/show_bug.cgi?id=683073
2012-08-31 16:43:52 -03:00
Florian Müllner
ff25a5e251 windowManager: Update animation of attached modals (again)
The fade animation we started using after centering attached
modal dialogs didn't work too well. So after going back to the
scale animation, adjust it to scale from the center rather
than the top, which works quite well.

https://bugzilla.gnome.org/show_bug.cgi?id=681601
2012-08-16 09:52:17 +02:00
Florian Müllner
aaf61cbbbe Revert "windowManager: Update animation of attached modals"
This reverts commit 6ab25cd791.

https://bugzilla.gnome.org/show_bug.cgi?id=681601
2012-08-16 09:52:17 +02:00
Florian Müllner
ca7c4edd41 windowManager: Update dim effect
The combination of desaturating and lowering the brightness does
not work too well in all cases, in particular for applications
using the dark theme variant. Dropping the desaturation effect and
making the brightness adjustment more profound gives a better
result.

https://bugzilla.gnome.org/show_bug.cgi?id=681601
2012-08-16 09:52:17 +02:00
Giovanni Campagna
f0e03b5e82 WorkspaceSwitcherPopup: fix for dynamic workspace changes
Changing the number of workspaces while the popup was visible (which
happens when moving windows on the last non empty workspace) resulted
in a wrong layout. Fix that, by listening to workspace-added and
workspace-removed signals, and by always requesting an updated size
from the actor.

https://bugzilla.gnome.org/show_bug.cgi?id=679005
2012-07-16 19:15:53 +02:00
Florian Müllner
c671ff74c6 windowManager: Replace custom shader with builtin ClutterEffects
While modal dialogs were attached to the parent's titlebar, it
made sense to leave the top of the parent window at full color.
With the new position of modal dialogs, it makes more sense to dim
the entire parent window, so we can use a combination of Clutter's
BrightnessContrast- and DesaturateEffect instead of our own custom
shader.

https://bugzilla.gnome.org/show_bug.cgi?id=674499
2012-07-14 03:33:57 +02:00
Florian Müllner
04570ac783 windowManager: Remove 'animate' parameter from (un)dimWindow()
The parameter has become rather pointless since we always pass the
same value.

https://bugzilla.gnome.org/show_bug.cgi?id=674499
2012-07-14 03:33:57 +02:00
Florian Müllner
6ab25cd791 windowManager: Update animation of attached modals
With modal dialogs no longer being attached to their parents'
titlebar, the current animation no longer works too well. Use
a simple fade animation instead.

https://bugzilla.gnome.org/show_bug.cgi?id=674499
2012-07-14 03:33:56 +02:00
Florian Müllner
a04350f7ce windowManager: Split _shouldAnimate() into two functions
... instead of using an optional parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=674499
2012-07-14 03:33:56 +02:00
Jasper St. Pierre
de65739c01 windowManager: Remove unused function
https://bugzilla.gnome.org/show_bug.cgi?id=679500
2012-07-12 10:11:57 -04:00
Giovanni Campagna
c3d3d346d4 WindowManager: ignore ctrl-alt-left/right
Fixes a regression introduced in de72065a

https://bugzilla.gnome.org/show_bug.cgi?id=679005
2012-06-27 22:17:46 +02:00
Jasper St. Pierre
e43fe98263 windowManager: Hold the window on the stage while going between workspaces
Right now the "move to workspace" keyboard shortcut transition isn't smooth. It
shows the window disappearing, hopping to the next workspace, and then sliding
into view. "Pin" the window to the stage while the animation is in progress,
then release it afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=660839
2012-06-27 19:35:37 +02:00
Giovanni Campagna
04dbf15d9b WindowManager: handle move-to-workspace keybindings
Install a custom handler for move-to-workspace-* keybindings that
shows the workspace switcher, which gives the user a sense of
direction when navigating with the keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=674104
2012-06-27 19:35:37 +02:00
Giovanni Campagna
de72065a4a WorkspaceSwitcher: simplify code for handling keybindings
Most of code implementing workspace switches was repeated with
minor differences on each direction. Instead, consolidate it
and use the new meta_workspace_get_neighbor.

https://bugzilla.gnome.org/show_bug.cgi?id=674104
2012-06-27 19:35:37 +02:00
Florian Müllner
731317230a windowManager: Adapt to mutter API change
https://bugzilla.gnome.org/show_bug.cgi?id=673014
2012-04-16 20:33:31 -04:00
Florian Müllner
c51acf7c2a panel: Add keyboard shortcut to open app menu
With the application menu now being more than a stub, it has
become a much more interesting target, so add a keyboard shortcut
to open it directly.
This should also ease some of the pain for focus-follows-mouse users.

https://bugzilla.gnome.org/show_bug.cgi?id=672909
2012-03-30 19:58:43 +02:00
Jasper St. Pierre
15f881f967 st: Remove custom text direction stuff
Clutter has its own built-in system for managing text directions, like GTK+.
Convert over to use this.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Florian Müllner
d714dfd82e shell-wm: Remove takeover_keybinding()
Introspection support is now good enough to set a custom keybinding
handler directly from JS.

https://bugzilla.gnome.org/show_bug.cgi?id=663584
2011-11-22 00:42:28 +01:00
Florian Müllner
a9ab8784c4 Adapt to mutter moving to GSettings
https://bugzilla.gnome.org/show_bug.cgi?id=663429
2011-11-11 20:32:43 +01:00
fry
b71e66c335 window-manager: Fix variable name
In _shouldAnimate() _animationBlockCount was referred to as
_animationsBlocked, fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=662394
2011-11-08 01:57:20 +01:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Adel Gadllah
0968e556fa WindowDimmer: Make effect private
There is no need for making this public as it is only accessed from within
WindowDimmer.
2011-10-03 18:22:58 +02:00
Adel Gadllah
130f2cf808 WindowDimmer: Don't try to use a ShaderEffect when GLSL is not available
This obviously won't work anyway but will just spam stderr with warnings,
so don't do it.
2011-10-03 18:22:47 +02:00
Florian Müllner
566d566f26 alt-tab: Do not hardcode ALT modifier
While we allow for arbitrary modifiers in keybindings, both the
alt-tab and ctrl-alt-tab popups close when ALT is not present in
the modifier mask, resulting in ALT being de-facto hardcoded.
Instead, pass the actual modifier mask when invoking the popups.

https://bugzilla.gnome.org/show_bug.cgi?id=645200
2011-09-20 21:07:19 +02:00
Owen W. Taylor
fb30822860 windowManager: shade the actor, not the texture
Applying the "dim window" effect to the MetaWindowActor has two avantages:
first it avoids triggering bugs where ClutterOffscreenEffect doesn't handle
clone paint correctly. Second, it avoids showing the window as dimmed in
alt-Tab and the overview, which is weird.

The small downside of this is that the shadow becomes slightly gray when
the window dimmed, which is wrong - if we switched from blending with gray
to a combination of desaturation and darkening, this problem wouldn't
happen.

Revert out the addition of startY to the shader, since we don't need it
and fix the application of alpha, since we need to handle alpha correctly
for the shadow.

https://bugzilla.gnome.org/show_bug.cgi?id=659634
2011-09-20 14:56:25 -04:00
Jasper St. Pierre
127ef8383b windowManager: Incorporate invisible borders into window dimming effect
Without this, the dim "fade" will start at the top of the untrimmed actor. With
a large enough draggable_border_width setting, this will show no fade at all.

https://bugzilla.gnome.org/show_bug.cgi?id=659302
2011-09-19 12:39:48 -04:00
Jasper St. Pierre
82eccb566c windowManager: Use an off-screen buffer for window dimming
The way the window dimmer shader is applied will cause rendering errors with
the rounded corners, invisible borders or shaped textures since it doesn't deal
well with the multitexturing used by the MetaShapedTexture. Use an off-screen
buffer to flatten the texture before being applied.

https://bugzilla.gnome.org/show_bug.cgi?id=659302
2011-09-19 12:39:41 -04:00
Dan Winship
a13af7fbcc windowManager: use meta_window_is_attached_dialog()
Use meta_window_is_attached_dialog() so that we only dim/unfold dialog
windows that mutter is actually showing as attached

https://bugzilla.gnome.org/show_bug.cgi?id=646761
2011-08-27 13:14:38 -04:00
Rui Matos
8db1ff8aef altTab: honor switch_*_backward key binding actions
https://bugzilla.gnome.org/show_bug.cgi?id=650452
2011-07-06 08:45:31 -04:00
Dan Winship
64b2b4a7d4 layout: new file handling shell layout
Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Alexander Larsson
82aea3e8d6 Import Shell as needed by recent commit 2011-05-20 11:14:54 +02:00
Colin Walters
bfd344cdec Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
We need to fix the latter to return a byte array, which gjs doesn't
deal with well right now.

https://bugzilla.gnome.org/show_bug.cgi?id=649981
2011-05-19 15:27:23 -04:00
Owen W. Taylor
c6170ed751 windowManager: fix up accounting of dimmed windows
Simplify the accounting of which windows we should dim by checking
the current state of windows rather than trying to track changes,
and by keeping a list of dimmed windows rather than a list of windows
with a dimmed parent. Remove windows from the list of dimmed windows
when they are destroyed.

This should fix problems where destroyed windows could end up in
the list of dimmed windows.

https://bugzilla.gnome.org/show_bug.cgi?id=644167
2011-03-16 12:31:06 -04:00
Adel Gadllah
76d788a186 windowManager: Add mechanism to block animations
Add an API to allow blocking animations in situations where
they aren't desireable.

https://bugzilla.gnome.org/show_bug.cgi?id=642188
2011-03-08 19:46:46 +01:00
Dan Winship
af4fcc831e ctrlAltTab: misc improvements
Fix the "panel" icon to be symbolic. Make the overview parts only show
up when in the overview, and the non-overview parts (eg, the Desktop
window, if there is one) only show up when not in the overview. Sort
the different items consistently with their locations on the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=618887
2011-03-07 11:15:05 -05:00
Rui Matos
a047132a2f altTab: enable the switch_group keybinding action
Allows the user to bring up the Alt+Tab popup with the current application's
window thumbnails selected.

https://bugzilla.gnome.org/show_bug.cgi?id=639341
2011-02-15 13:43:32 -05:00
Florian Müllner
ef8c9e0abb workspace-switcher: Switch to vertical orientation
With workspaces now being stacked vertically, the horizontal
indicators in the workspace switcher are rather odd. There are
some designs for an improved workspace switch animation, but
it may take a while to implement them, so for now just change
the orientation of the existing switcher.

https://bugzilla.gnome.org/show_bug.cgi?id=641931
2011-02-09 20:02:51 +01:00
Owen W. Taylor
295d286161 Switch to a vertical layout for workspaces
The new plans for a row of workspace thumbnails on the right side of the
overview means that the mental model we present to the user will be
vertical, so switch the Metacity workspace layout to be vertical and
adjust the keybinding handling, animations, and workspace layout in
the overview to match.

(This commit does not change the workspace switching indicator pending
finalization of what we want to do with that - it still shows workspaces
arranged vertically.)

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Adel Gadllah
4c449124ee windowManager: Skip disposed windows in _switchWorkspaceDone
Avoid reparenting already disposed windows.

https://bugzilla.gnome.org/show_bug.cgi?id=639853
2011-01-18 19:35:01 +01:00
Florian Müllner
1efb0213c5 window-manager: Swap workspace order for RTL locales
Workspaces should be aligned from right to left in RTL locales, so
take the text direction into account when switching workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=634691
2010-12-03 18:25:49 +01:00
Owen W. Taylor
2fa6f7ba7e Adapt to removal of Mutter namespace
MutterWindow and MutterPlugin have been renamed to MetaWindowActor
and MetaPlugin, mutter_plugin_list_windows() to
meta_plugin_list_window_actors(). Adapt to those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=632500
2010-10-23 14:02:45 -04:00
Maxim Ermilov
61b029207d [windowDimmer] handle changing of window_type
dim/undim parent window when window_type changed to/from MODAL_DIALOG
https://bugzilla.gnome.org/show_bug.cgi?id=630363
2010-10-01 01:09:15 +04:00
Adel Gadllah
61c906807b Don't use mutter_window_get_window_type / MetaCompWindowType
They have been removed so we have to use meta_window_get_window_type()
and MetaWindowType instead.

https://bugzilla.gnome.org/show_bug.cgi?id=630363
2010-09-30 18:36:28 +02:00
Maxim Ermilov
5ccc763385 Cancel Destroy effect of modal windows when the parent has gone away
Modal dialogs slide back into the titlebar of the parent window when destroyed.
This looks weird if the parent window itself has been destroyed, so cancel the
effect in this case.
https://bugzilla.gnome.org/show_bug.cgi?id=629560
2010-09-15 15:55:33 +04:00
Maxim Ermilov
45dcfa9a70 [Overview] Don't dim window previews
Undim windows when going to the overview and
restore their state when leaving.
https://bugzilla.gnome.org/show_bug.cgi?id=629371
2010-09-12 13:39:52 +04:00
Maxim Ermilov
a969e82954 Attach dialogs to windows with visual effects
Override the new mutter preference /apps/mutter/general/attach_modal_dialogs
to attach modal dialogs to their parent window. Animate the modal dialogs
expanding from the top of the parent window. Slowly dim the parent window
after the dialog comes up.
https://bugzilla.gnome.org/show_bug.cgi?id=612726
2010-09-11 05:39:57 +04:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Maxim Ermilov
4800a80c3a Update GnomeShellPlugin according to recent changes in MutterPlugin
https://bugzilla.gnome.org/show_bug.cgi?id=621083
2010-06-17 01:44:44 +04:00
Marina Zhurakhinskaya
703b21cef0 Don't use double quotes for things that don't need to be translated
This is our convention.

The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
2010-05-13 16:00:38 -04:00
Adel Gadllah
bab5a006d8 windowManager: Fix up map effect
Update comment and set the opacity rather than scaling in _mapWindowDone,
 also as we don't have to move the anchor point's gravity for this effect.
2010-04-02 20:30:10 +02:00
Adel Gadllah
f89b95c2aa windowManager: Fade windows on map
Fade in new windows instead of scaling them up from 0 to 1.
2010-04-02 19:51:16 +02:00
Colin Walters
e21aea6e13 [windowManager] Really fix state checking for workspace switcher popup
To be correct just always check at time of use whether the overview
is visible, rather than trying to use whether or not it was
constructed earlier.
2010-03-18 14:53:58 -04:00
Adel Gadllah
6c13ca817d Fix workspaceSwitcherPopup
The check in WindowManager._showWorkspaceSwitcher is supposed
to check if the overview is _not_ visible.

Fix that.
2010-03-18 19:39:09 +01:00
Colin Walters
d98db2bd59 Use Meta.Display.lookup_keyboard_action to enable workspace switches
Also refactor Alt-F2 to use this as well.

https://bugzilla.gnome.org/show_bug.cgi?id=613101
2010-03-18 14:15:07 -04:00
William
9a2d883cf5 [windowManager] Allow extensions to more easily override keybindings
Add an explicit API for overriding keybindings.

https://bugzilla.gnome.org/show_bug.cgi?id=612651
2010-03-17 20:07:32 -04:00
Abderrahim Kitouni
5ca665bdde fix minimize animation for RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2010-03-11 16:51:26 -05:00
Adel Gadllah
abc7b1ff02 New workspace switcher popup
Replace the current workspace switcher popup (which is still the old metacity popup), with a clutter based one, which fits better into the overall shell design.

https://bugzilla.gnome.org/show_bug.cgi?id=609187
2010-02-12 23:52:15 +01:00
Adel Gadllah
6f83b39ee4 Consume windows by the Activities button on minimize
The design document states:
"Animate the action as shrinking into or being consumed by the Activities Item"

This makes it clear what happens to the window (i.e it doesn't vanish but can be brought back by going to the overview).

https://bugzilla.gnome.org/show_bug.cgi?id=609079
2010-02-05 17:01:18 +01:00
Steve Frécinaux
26015ef16d Select next window from the current app on alt+tab
This slightly changes the behaviour of the alt+tab window, this way:
when using alt-tab on a workspace that contains two or more windows from
the same window, the application selected when hitting alt+tab is the
currently selected application, but the highlighted window is the next
one.

Intended goal is to make it easier to cycle around windows of the same
application while not having to cycle through all the applications first.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-04 12:45:23 -04:00
Dan Winship
9432ddb12e [windowmanager] Remove destroy effect
It slows things down, it's a slightly weird effect, and because the
window is still live while it's animating, you may see subwindows
being destroyed during the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=596441
2009-09-28 09:45:38 -04:00
Dan Winship
11d884d724 [AppSwitcher] Port Alt-Tab switcher to custom_handler interface
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-24 16:13:42 -04:00
Dan Winship
ceefc5eea4 Convert remaining uses of "let me = this;" to Lang.bind
https://bugzilla.gnome.org/show_bug.cgi?id=595293
2009-09-15 13:11:23 -04:00
Dan Winship
d8cabbee0b More global-ization 2009-09-11 17:23:42 -04:00
Colin Walters
f097304f3b Bug 582763 - Remove maximization effects
The maximize effect looked really ugly.  In the absence of any cooler
effects, none at all is better than what we have.  Current compiz
doesn't have one either.

Note that in the future when we merge the frame into the panel
in the maximize case, we may want an effect for that.
2009-08-14 08:41:00 -04:00
Sander Dijkhuis
47af454115 Bug 591437 - Rename overlay.js to overview.js
Replace 'overlay' with the more descriptive name 'overview'
where the Activities Overview is meant. Call it Overview
(capitalized) in code comments.

The overlay-group and overlay-key provided by Mutter are not
affected, since they may be used for other components than
the Activities Overview.
2009-08-11 15:15:25 +02:00
Dan Winship
deaf0e4e1a Make switch-workspace faster (the same as the other wm ops) 2009-05-13 15:24:32 -04:00
Dan Winship
675fe56176 Use transition:"easeOutQuad" for switch_workspace, just like everywhere else
the overshoot-and-bounce-back effect (easeOutBack) gets annoying after a while
2009-05-11 16:21:39 -04:00
Dan Winship
0f2860b588 Don't temporarily show minimized windows while switching workspaces 2009-05-11 13:06:42 -04:00
Dan Winship
062e1aa78b Reorganize overlay hiding/showing code
Rather than having main.js manage this, put it into overlay.js, and
have the overlay object emit signals that other code can watch to do
things when the overlay is showing/shown/hiding/hidden.
2009-05-07 16:41:07 -04:00
Owen W. Taylor
20e755023b Clean up underscores in function and variable names
Try to fix all places where we accidentally used foo_bar instead
of fooBar for function names, function parameters, and variables.

(Lucas Rocha pointed out one example.)

http://bugzilla.gnome.org/show_bug.cgi?id=581141
2009-05-04 13:50:49 -04:00
Dan Winship
81dbf5118f Implement MetaAltTabHandler
This is a fairly simple implementation, not all that different from
plain metacity's. Further improvements could be made to
js/ui/altTab.js in the future.

http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 13:01:03 -04:00
Dan Winship
e79c776c2e Add a wrapper around tweener to do some extra integration
Automatically removes tweens on destroyed actors, and provides
additional "animation started/stopped" callbacks (eg, for tracking
whether or not to show window clone titles)
2009-02-10 11:20:39 -05:00
Jonathan Matthew
6dd302e5ce Bug 570583: handle tweens being overwritten during window effects
Since tweener can't do multiple tweens on the same property, it
calls an overwrite callback for any existing tweens when a new
tween is added for the same property.  Here we use the overwrite
callback to tell mutter that the effects are done.
2009-02-10 12:06:00 +10:00