Commit Graph

106 Commits

Author SHA1 Message Date
Jasper St. Pierre
df848aa084 layout: Move the keybinding mode to the user of PressureBarrier
For the hot corner case, we want to have the pressure apply both in
and outside of the overview, so we need to move this to the user. At
the same time, use keybinding mode math that's more like what's used
in filterKeybinding.

While it may seem like an abuse of the KeyBindingMode API, it may
become more reasonable if one thinks of the pressure barrier as a
binding of sorts, just applied to the mouse. If a ButtonBinding API
was added to mutter, I think we'd use the existing KeyBindingMode
infastructure there as well.
2013-03-04 15:50:44 -05:00
Jasper St. Pierre
0cc1615252 layout: Debounce triggering barriers
Ensure that the pointer leaves the barrier before we trigger again.

For the message tray case, this doesn't matter much, as the trigger
won't have any effect after the grab is taken, but in the overview
HotCorner case, this ensures that we don't trigger the overview
transition many times simply by holding pressure against the hot
corner, which is easy to do accidentally.
2013-03-04 15:50:44 -05:00
Jasper St. Pierre
d4259fa8aa layout: Prevent going into negatives with the pressure
We capped each event to 15px of travel, but we didn't do the same
cap when subtracting events that were too old.
2013-03-04 15:50:43 -05:00
Ray Strode
cd37e2908f main: don't hook up overview keybinding until after startup
Toggling the overview during the startup animation reportedly
causes stuck grab and other odd behavior.

There's no reason to handle toggling the overview during this
time anyway.

This commit defers that handling until after startup.

https://bugzilla.gnome.org/show_bug.cgi?id=694837
2013-03-04 11:58:39 -05:00
Ray Strode
1cbb8b9851 layout: tweak startup animation
Following designer feedback, this commit makes the startup
animation a little more subtle.

https://bugzilla.gnome.org/show_bug.cgi?id=694326
2013-03-02 17:44:26 -05:00
Ray Strode
570fc68cb1 main: put noise texture below startup animation, not still frames
Right now we take a still frame of the desktop before showing the
start up animation.  This gives us an animation over what was
there before startup.

That's not actually desirable when restarting the shell.  We don't
want to animate over undecorated windows, we really want to animate
over the noise texture.

This commit drops the still frames in favor of the noise texture.

https://bugzilla.gnome.org/show_bug.cgi?id=694326
2013-03-02 17:44:26 -05:00
Giovanni Campagna
b6bf8d5b2d Layout: don't minimize fullscreen windows that are focused
Windows can sometimes be focused, or appear to be focused, without being
at the exact top of the stack, for example in the case of override-redirect
windows, or with attached modal dialogs. In that case, we should not
try to minimize them (as it creates a loop that makes it impossible to restore
the window)

https://bugzilla.gnome.org/show_bug.cgi?id=694905
2013-03-01 18:07:47 +01:00
Jasper St. Pierre
804ff8b5a5 layout: Mark the correct monitor as fullscreen 2013-02-28 13:34:05 -05:00
Jasper St. Pierre
41f14e0e89 layout: Trigger the tray if one event passes the threshold
As a special-case to the "cap event" rules, this allows a heavy swipe
from top to bottom to allow triggering the tray without having to push
into it.

https://bugzilla.gnome.org/show_bug.cgi?id=694467
2013-02-27 14:01:42 -05:00
Jasper St. Pierre
01bd10f485 layout: Cap each event to 15px of motion
When pressing against the bottom of the screen, we shouldn't
really take more than 15px from each event, to prevent spruious
mouse movements from opening the barrier.

https://bugzilla.gnome.org/show_bug.cgi?id=694467
2013-02-27 14:01:42 -05:00
Jasper St. Pierre
476eacd5ca layout: Adjust the pressure barrier threshold values
After a day of experimentation with Cosimo and Jon McCann, we
found that this was the best way to do this.

https://bugzilla.gnome.org/show_bug.cgi?id=694467
2013-02-27 14:01:42 -05:00
Adel Gadllah
a361180745 layout: Handle _NET_WM_FULLSCREEN_MONITORS
Mark all monitors that fullscreen when window is using
the _NET_WM_FULLSCREEN_MONITORS to be fullscreen on multiple monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=646861
2013-02-25 22:06:45 +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
Ray Strode
c562245c16 main: don't show stage until still frames are loaded
We sometimes map the stage before we've loaded a background on it
because of a race asynchronously loading the session mode.

This manifests as the startup animating starting over a white
background.

This commit defers showing the stage until after the still frames
are loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=694321
2013-02-21 15:01:39 -05:00
Jasper St. Pierre
b4678a1cee layout: Clean up consoleBackgroundGroup
We shouldn't leave a reference to a destroyed actor just hanging
around.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-20 11:36:19 -05:00
Jasper St. Pierre
5d3c90197c layout: Rebuild struts and the input region when the Shell starts up
This means that windows will be positioned correctly with respect
to the panel when the shell starts up, and there won't be adjusting
after the session animation zooms in entirely.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-20 11:36:19 -05:00
Jasper St. Pierre
d5d517748c layout: Remove freezeUpdateRegions/thawUpdateRegions
Due to a bad rebase causing freezeUpdateCount to never get initialized,
these functions effectively did nothing. Since we're going to go to a
different mechanism for freezing region updates, let's just tear these
out now instead of fixing them before tearing them out.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-20 11:36:19 -05:00
Jasper St. Pierre
de3d3c15a5 layout: Don't bother updating the regions in the greeter
The greeter is always full-screen, so this should never matter.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-20 11:36:18 -05:00
Jasper St. Pierre
e801647083 layout: Fix some indentation 2013-02-19 21:00:46 -05:00
Jasper St. Pierre
1188b1be36 layout: Hide the message tray and OSK during the startup animation
https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-19 20:57:21 -05:00
Ray Strode
905c4932d1 layout: invert isGreeter check
I somehow lost an exclamation point.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-19 20:57:21 -05:00
Ray Strode
6484da26f0 layout: add back startingUp state variable
I dropped it on accident during last minute refactoring

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-19 20:57:21 -05:00
Giovanni Campagna
079041cf1f BackgroundMenu: fix regression from new background handling
BackgroundMenu must ensure the actor it attaches to is reactive, and
the layout manager must create a background menu for the first background
too.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-19 20:57:21 -05:00
Giovanni Campagna
e4af954a95 LayoutManager: add missing constant
https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-20 02:25:36 +01:00
Ray Strode
ba4780cbd3 layout: don't bother hiding window group
Right now we hide the window group if we're a greeter.
We did this to avoid showing the background. These days
we don't add the background in the first place, so we
can drop this code.

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-19 18:39:54 -05:00
Ray Strode
3c8325f1f3 layout: rework background handling
This commit updates the code to use mutter's new background
api, and changes the shell's startup animation to be closer
to the mockups.

Based on initial work by Giovanni Campagna

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-19 18:39:54 -05:00
Jasper St. Pierre
1950a67e15 Run the startup animation when we don't have much going on
Starting the startup animation when we don't have that much IO
makes it a lot more visible.

Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-18 15:37:59 -05:00
Cosimo Cecchi
eab4c7bce9 Don't call beginItemDrag() for XDND
The dragged actors are not overview items.

https://bugzilla.gnome.org/show_bug.cgi?id=686984
2013-02-18 14:54:53 -05: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
7b1aab3759 layout: Fix tray barrier never getting destroyed
Due to a typo, we accidentally set trayPressure to null,
making the next branch always fail.

https://bugzilla.gnome.org/show_bug.cgi?id=694070
2013-02-18 13:25:12 -05:00
Adel Gadllah
d9770dcffb layout: Fix regressions
Commit 6b4f524620 removed the layer checks
_updateFullscreen ... this causes corruption when alt-tabbing out
of a fullscreen window so restore the check.

The commit also removed the screen sized check so we are no longer
setting all monitors to fullscreen. Fix that as well by using
window.is_screen_sized() to perform the check.

https://bugzilla.gnome.org/show_bug.cgi?id=694079
2013-02-18 14:13:37 +01:00
Jasper St. Pierre
641794d458 layout: Reword a comment
I don't even know what this was trying to say before...
2013-02-18 04:31:45 -05:00
Adel Gadllah
ae93d258a5 layout: Call meta_window_* on the meta_window rather then on the actor 2013-02-17 21:50:23 +01:00
Adel Gadllah
6b4f524620 layout: Use window.is_monitor_sized
Mutter now provides a method for this, so use it.
2013-02-17 21:43:11 +01:00
Adel Gadllah
340609d149 Fix XDND regression
The top_window_group blocks the panel elements from being found by the XDND
pick so hide the whole group from picks as we never attempt to pick its contents
anyway.
2013-02-17 20:52:00 +01:00
Cosimo Cecchi
53a595885a pressure-barrier: don't discard grabbed events when overview is grabbing
Since we still want to trigger the message tray in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=693987
2013-02-17 13:12:55 -05:00
Jasper St. Pierre
e3eb4a20a5 layout: Remove _addBarrierEvent
Moving it inline to when we get the event means that we can
remove the duplicate call to _getDistanceAcrossBarrier.

https://bugzilla.gnome.org/show_bug.cgi?id=693854
2013-02-15 16:49:46 -05:00
Jasper St. Pierre
001bbd36f5 layout: Fix old event removal
If we increment our index variable while looping, this means that
firstNewEvent will be one higher than it should. With a length 1
array, all events will be removed, so this has a cascading effect
that events will not be stored at all.

https://bugzilla.gnome.org/show_bug.cgi?id=693854
2013-02-15 16:49:46 -05:00
Jasper St. Pierre
22ddec46ab Place popup menus and other override-redirect windows on top of the panel
https://bugzilla.gnome.org/show_bug.cgi?id=633620
2013-02-14 13:45:39 -05:00
Jasper St. Pierre
a4e70ba4ca layout: Restructure input region and struts code
Have two branches, one for input region and one for struts. This
makes it easier to skip one of the branches, like in the case where
we want to skip input regions if we have a popup menu visible.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2013-02-14 13:24:04 -05:00
Jasper St. Pierre
978ac65cae layout: Don't use reparent
reparent() defines the new actor stacking order based on the
existing depth of the actor, which is flat out wrong. Simply
remove the actor from its old parent and add the new one in.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2013-02-14 13:24:04 -05:00
Florian Müllner
2d9cf195d7 layout: Remove obsolete message tray <=> OSK interaction code
Message tray and on-screen keyboard are now exclusive, so remove
all code that shuffles boxes around to make it possible to show
both at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=662687
2013-02-14 17:31:32 +01:00
Giovanni Campagna
33dde63256 Main: move the stage hierarchy initialization to LayoutManager
It is cleaner to concentrate all layout and chrome management
in one place, instead of having it scattered around the codebase.

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-14 01:12:24 -05:00
Jasper St. Pierre
fb63f48d0a layout: Trigger the message tray by downward pressure
A pressure barrier is a barrier that activates after the user pushes
against the bottom of the screen in a short time. Implement this using
the new XInput 2.3 features that provide extended information about
pointer barriers, and use it so that pushing against the bottom of
the screen edge brings up the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:28:11 -05:00
Jasper St. Pierre
c0279df3c6 layout: Port to the new mutter-based barrier wrappers
As pressure barriers need a signalling mechanism to provide
information about when and where they are hit, an object which
provides a signal is a more appropriate abstraction for a pointer
barrier than a functional ID-based approach. Mutter has gained
pointer barrier wrappers, so use its objects instead of ours.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:27:42 -05:00
Jasper St. Pierre
5ba0c6404b main: Move getWindowActorsForWorkspace to layout
It's only used here.

https://bugzilla.gnome.org/show_bug.cgi?id=691746
2013-02-07 01:36:31 -05:00
Jasper St. Pierre
12ac2e5534 Switch all external uses of Main.panel.actor.height to the work area
https://bugzilla.gnome.org/show_bug.cgi?id=692680
2013-02-06 22:35:49 -05:00
Jasper St. Pierre
60985b396a layout: Use the mutter functions for doing monitor math
https://bugzilla.gnome.org/show_bug.cgi?id=692680
2013-02-06 22:35:10 -05: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
Rui Matos
eab497a814 layout: Call _startupAnimation() on init
Commit 8e231cb2ec inadvertently removed
it.

https://bugzilla.gnome.org/show_bug.cgi?id=693067
2013-02-04 11:23:38 +01:00