Commit Graph

101 Commits

Author SHA1 Message Date
Florian Müllner
6ae914da2f overview: Handle drag-cancelled signal for items
Allow handling the drag-cancelled signal for non-window items, just
like the handling for windows instroduced in commit a80e88e33.

https://bugzilla.gnome.org/show_bug.cgi?id=644324
2011-03-19 11:16:10 +01:00
Owen W. Taylor
e8eec2d357 Use points for font sizes
Do a basic job of converting font sizes from pixels to points, so they
will scale will the global GNOME scale factor. Some other sizes that are
clearly related to the font sizes are changed to ems, but no comprehensive
attempt is made to get rid of px units.

https://bugzilla.gnome.org/show_bug.cgi?id=636868
2011-03-15 12:01:40 -04:00
Adel Gadllah
29d473f2fa XDND: Fix dragMonitor leak in WorkspacesDisplay
WorkspacesDisplay removes its dragMonitor in _dragEnd, but
this was never called in when a xdnd drag ended causing
dragMonitors to stack up and handling events multiple times.

Fix that by making sure that _dragEnd is called when xdnd ends.

https://bugzilla.gnome.org/show_bug.cgi?id=644642
2011-03-14 22:03:33 +01:00
Owen W. Taylor
d16acc43d9 viewSelector: allow programmatically switching to tabs
Add the idea of an 'id' for a tab, and add a public switchTab method
so you can switch to 'applications' or 'windows'. This will be useful
for performance tests that test tab switching performance.

https://bugzilla.gnome.org/show_bug.cgi?id=644266
2011-03-11 19:25:40 -05:00
Alexander Larsson
a80e88e33e dnd: Add a drag-cancelled signal
This lets us start the workspace zoom out animation right when the
snapback starts, rather than waiting for the snapback to finish.

https://bugzilla.gnome.org/show_bug.cgi?id=643786
2011-03-09 10:36:09 +01:00
Alexander Larsson
0207f1f29b Restructure the way we handle positioning zooming in Workspace
We currently show the workspace in the overview in a rectangle
with the same aspect ratio as the screen. Originally this was
probably done since it showed the desktop, but we don't do this
anymore, and the positioning of the windows in the overview is
strictly a grid, so its not in any way related to monitor geometry.
Additionally, in the multihead case the screen aspect ratio is
very different from the overview monitor geometry, so a lot of
space is lost.

So, instead we just fill the entire inner rectangle of the overview
with the workspace. However, the way the zoom into and out of the
workspace right now is by scaling the workspace so that it covers
the entire monitor. This cannot really work anymore when the workspace
is a different aspect ratio. Furthermore the coordinates of the
window clone actors are of two very different types in the "original
window" case and the "window in a slot case". One is screen relative,
the other is workspace relative. This makes it very hard to compute
the cost of window motion distance in computeWindowMotion.

In order to handle this we change the way workspace actor positioning
and scaling work. All workspace window clone actors are stored in
true screen coordingates, both the original window positions and the
in-a-slot ones. Global scaling of the workspace is never done, we
just reposition everything in both the initial zoom and when the
controls appear from the side.

There is one issue in the initial and final animations, which is that
the clip region we normally have for the workspacesView will limit the
animation of the clones to/from the original positions, so we disable
the clip region during these animations.

https://bugzilla.gnome.org/show_bug.cgi?id=643786
2011-03-09 10:36:02 +01:00
Dan Winship
0cccf1d4cc viewSelector: add Applications pane and search entry to Ctrl-Alt-Tab
Add Ctrl-Alt-Tab support to ViewTab, and fix the Applications pane to
scroll to track the keyboard focus.

The Windows pane can be switched to, but navigation within the pane is
not yet implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=618887
2011-03-07 11:15:05 -05:00
Dan Winship
7aa326a836 overview, appDisplay: add Dash to Ctrl-Alt-Tab
Add the dash to Ctrl-Alt-Tab, add appropriate :focus CSS, and connect
to the popup-menu signal on dash icons.

https://bugzilla.gnome.org/show_bug.cgi?id=618887
2011-03-07 11:15:05 -05:00
Maxim Ermilov
3a6b4f3eb5 main: correct pushModal/popModal mechanism
1. disconnect destroy signals in popModal (actors can have great lifetime and then pushed again)
2. incorrect pushModal/popModal pair in overview
https://bugzilla.gnome.org/show_bug.cgi?id=64078
2011-03-03 03:53:04 +03:00
Adel Gadllah
260e6662f0 overview: Remove unused 'getWorkspacesForWindow' method 2011-02-25 19:43:47 +01:00
Dan Winship
d5735496af viewSelector: don't process key presses from capture-event
Rather than connecting to stage::capture-event and then trying to
guess whether or not a given key-press should be handled by us or not,
handle the end-search-on-Escape case from entry::key-press-event
(since it only makes sense when the entry is focused anyway) and the
start-search-on-printable-key case from stage::key-press-event (which
will only get the events that no other actor wanted for itself).

Similarly, do exit-overview-on-Escape and switch-panes cases from
stage::key-press-event, rather than
viewSelector.actor::key-press-event, so that they will work correctly
even if the keyboard focus is somewhere else. (Also fix a longstanding
bug in the pane-switching code, which was supposed to be disabled when
a search was active, but was checking a non-existent variable.)

https://bugzilla.gnome.org/show_bug.cgi?id=642502
2011-02-24 09:36:36 -05:00
Adel Gadllah
6d6ec46f25 XDND: Remove the switch timeout in _onDragEnd
When the user cancels the drag while hovering over a window the timeout
handler will throw an exception because the drag actor will be destroyed
at this point.

Fix that by removing the timeout in _onDragEnd.
2011-02-24 11:47:00 +01:00
Adel Gadllah
8d78c3a2ab XDND: Always update the timestamp on motion
The xdnd timestamp gets updated on every xdnd-position event,
so while waiting for the window timeout to fire we need to make sure we
update the timestamp when getting on motion to activate the window
with the correct timestamp.
2011-02-24 11:46:53 +01:00
Owen W. Taylor
9c4cee7875 overview: avoid round-off errors when sizing and positioning view selector
We need the view selector to extend all the way to the right edge of the
monitor, so size and position the view selector in a way that the sum of
its X position and its width add up to the primary monitor width.

https://bugzilla.gnome.org/show_bug.cgi?id=642834
2011-02-21 12:20:38 -05:00
Florian Müllner
6b429b7f50 view-selector: Remove show/hide functions
As Main.overview is now usable from the view selector's constructor,
move the setup of signal connections there and remove the show/hide
methods which were used as workaround.

https://bugzilla.gnome.org/show_bug.cgi?id=642196
2011-02-16 19:58:21 +01:00
Florian Müllner
f1c279765b dash: Remove show/hide functions
As Main.overview is now usable from the dash's constructor, move
the setup of signal connections there and remove the show/hide
methods which were used as workaround.

https://bugzilla.gnome.org/show_bug.cgi?id=642196
2011-02-16 19:58:21 +01:00
Florian Müllner
f39e693324 overview: Split a public init() function out of the constructor
The Overview does not only hold the different elements visible in
the overview, but is also a central point to manage drag signals.
As objects which are constructed in the overview constructor cannot
access Main.overview (as its constructor has not finished yet), we
use misnamed show/hide methods to work around this limitation, which
are called when entering/leaving the overview.
A better way to handle this problem is to remove the limitation
altogether by splitting the overview constructor between internals,
which remain in the constructor, and more complex objects which
need to access Main.overview, and whose initialization is moved
to a public init() function which is called by main.js after the
overview has been constructed.

https://bugzilla.gnome.org/show_bug.cgi?id=642196
2011-02-16 19:58:17 +01:00
Florian Müllner
2f3e47b586 overview: Make the dash public
In order to enable components other than Overview to read the
dash's iconSize, make the dash a public property of the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=639428
2011-02-12 23:32:57 +01:00
Florian Müllner
eb8fc738af swipe-scrolling: Take threshold into account during drag
On button-release, a threshold is used to determine if the gesture
should be considered a click and thus ignored. While the drag is
active though, the controlled actor is dragged immediately. As a
result, dragging by a tiny amount does not trigger a snap back when
the action is interpreted as a click. As a fix, do not update the
dragged actor's position until the same threshold is passed.

https://bugzilla.gnome.org/show_bug.cgi?id=640494
2011-01-25 10:31:52 +01:00
Florian Müllner
b9e1d917da swipe-scroll: Don't eat button-release events on click
The main overview group starts capturing events on button-press
events to implement swipe-scrolling. While reactive children of
the group which handle both button-press and button-release events
don't trigger swipe-scrolling, children that only rely on
button-release have stopped working - at least the primary/secondary
icons of the search entry are affected. While the capture handler
already checks the pointer movement between press and release to
determine whether the action should be considered a click rather
than a drag, it still blocks the release event from propagating.
Instead, only block release events for drag actions, but not for
clicks.

https://bugzilla.gnome.org/show_bug.cgi?id=640493
2011-01-25 10:31:52 +01:00
Florian Müllner
a6da22fa70 overview: Add a facility for swipe-scrolling
The workspaces view allows to drag the active workspace to swipe-scroll
to the next or previous workspace. While this behavior can come in handy
in general, there are good reasons to move the functionality to the
overview:

 - Finding a spot on a workspace to start a drag can be hard,
   especially when the workspace contains a single window
 - With the new layout, workspaces have no visible border, making
   it hard to predict where a drag can be initiated
 - The same behavior is equally useful for other elements

So add setScrollAdjustment() to the overview, which allows setting
an adjustment controlled with swipe-scrolling (either horizontally
or vertically); only a single adjustment can be controlled at a
time. A swipe-scroll can be initiated on any part of the background that
is not occupied by a reactive actor. For cases where further control
is needed, 'swipe-scroll-start' and 'swipe-scroll-end' signals are
emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=635034
2011-01-24 02:59:32 +01:00
Florian Müllner
df3560143d overview: Always return a value in _onDragMotion()
Drag monitor functions are supposed to return a value, but
_onDragMotion() does not always do so. Add the missing return
value and remove unnecessary else.
2011-01-20 17:04:38 +01:00
Adel Gadllah
ee6a852996 XDND: Don't reset switch timeout when pointer is over the same window
Currently we reset the timeout on every mouse movement which means
the user has to keep the mouse at the exact same position for 1.25
seconds.

Be more tolerant and allow the user to move the mouse over the
window without reseting the timeout, which should make activating
windows easier.

https://bugzilla.gnome.org/show_bug.cgi?id=638896
2011-01-20 09:57:50 +01:00
Florian Müllner
56f6c9c5f6 genericDisplay: Remove unused module
GenericDisplay used to provide a common base class for places and
recent items, none of which exists anymore. As of current mockups,
display items in "Finding and Reminding" should be based on
BaseIcon / IconGrid instead.
2011-01-14 22:30:02 +01:00
Dan Winship
7322a4e4ef messageTray: add SystemNotificationSource, moved from overview.js
Move the overview's "System Information" source here, so it can be
used by non-overview code as well.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Adel Gadllah
0052657a22 Overview: Update warping code to new gdk api 2011-01-05 23:45:02 +01:00
Adel Gadllah
ceedc7e32c Implement cross overview drag & drop
The gnome-panel allows the user to hover over a tasklist entry
while draging to activate a minimized or obscured window and drop onto it.

Implement a similar behaviour by allowing draging to the activities button or
the hotcorner (and thus opening the overview), which allows the user to
activate any window (even on different workspaces) as a drop target.

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2011-01-05 23:19:56 +01:00
Owen W. Taylor
62507c9759 Add a facility to show the stage without grabbing
When the user is doing a drag-and-drop, we want to temporarily show the
stage to allow them to drag to a different window. But we're not "really"
in the overview, and getting a grab would conflict with the X client doing
the drag and drop.

So add a showTemporarily()/hideTemporarily() pair of methods that show
the overview without grabbing.

This adds a lot more possibilities for asynchronous race conditions, so
rework the code to be more robust against multiple calls to show*()
and hide*(). The interpretation is now that all calls to show*() and
hide*() affect the state, but if we have conflicting calls to show and
hide we wait until the current animation is finished before correcting
to the right visual state.

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2011-01-05 23:19:51 +01:00
Florian Müllner
eef194c3aa shell-info: Use transient notifications
According to the designers, system notifications should be transient;
so now that transient notifications are supported properly, make use
of it instead of using a timeout to remove the associated source.
2010-12-16 22:55:11 +01:00
Luca Ferretti
3262b63325 overview: mark Windows and Application as translatable 2010-12-16 00:30:21 +01:00
Dan Winship
42366e4be4 overview: Use a symbolic icon for notifications
Notifications from the system should use symbolic icons.

Also fix up the summary area CSS so the icon gets the right colors.

https://bugzilla.gnome.org/show_bug.cgi?id=636137
2010-11-30 11:26:30 -05:00
Florian Müllner
e2e11b1a29 overview: Update animation
Update the animation on entering/leaving the overview to only zoom
the window previews and fade other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:54 +01:00
Florian Müllner
b59daac6f3 dash: Improve DND to dash and allow reordering
Show a positional indicator where a new favorite will be added and
make the favorites re-orderable. Also allow the removal of favorites
using drag-and-drop according to the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:54 +01:00
Florian Müllner
5fef9188c9 workspaces: Change handling of window-drag signals
Delegate the emission of the window-drag-begin/window-drag-end
signals to overview functions, as done already for other items.
This will enable objects to react to those signals without having
access to the workspace objects / the workspaces view.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:54 +01:00
Florian Müllner
d5d7d8a391 overview: Add ViewSelector to the overview
Add the view selector and adjust the positioning of elements in the
overview. Unlike the old dash, the view selector is made public to
indicate that extensions may add additional views or search providers.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
7811632e6f workspaces: Rework workspace controls for the view selector
As workspaces will appear as a particular view in the view selector,
merge WorkspacesControls and WorkspacesManager to control workspaces
and related controls, so that a single actor can be added to the
selector instead of positioning the elements from the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
3e4f744e56 dash: Reimplement the dash based on AppWell code
The new dash implementation is a single-column vertical sidebar,
whose items are scaled dynamically to fit the available height.
If the height is still exceeded after scaling down to a minimum
item size, excess items are cut off.
The now unused old dash implementation is renamed to OldDash, as
its code will be used as a base for the new view selector element.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:47 +01:00
Florian Müllner
f24e567dc4 overview: Do not zoom the desktop background
While scaling the desktop background with the window previews represents
workspaces quite intuitively, the approach is not without problems.
As window previews in the overview behave quite differently to "real"
windows, the representation of workspaces as miniature versions of
"real" workspaces is flawed. The scaling also makes the transitions
to and from the overview much more visually expensive, without adding
much benefit.
Leaving the background in place provides more visual stability to the
transitions and emphasizes the distinctive behavior of elements in the
overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Florian Müllner
1ea488bb3d overview: Replace InfoBar with message tray notifications
The layout of recent mockups occupies the space previously reserved
for the info bar with the view selector. As the bar's purpose is
mainly to provide the user with feedback, it makes sense to use the
existing message tray facility instead of moving the bar elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Florian Müllner
5c60d8982e [Overview] Fix zoom when dragging items from the dash
Commit 4632db177 removed a required include statement, re-add it to
fix DND from the dash.
2010-08-21 11:25:20 +02:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Florian Müllner
528930d0a9 [Lightbox] Use a fade effect to smooth the transition
Add show()/hide() methods to Lightbox, which (optionally) fade the
lightbox. Change all lightboxes to fade in smoothly.

https://bugzilla.gnome.org/show_bug.cgi?id=602466
2010-06-09 17:07:10 +02:00
Florian Müllner
88be8e87ac [Overview] Fade dash menus
As the design calls for smooth transitions whenever possible, use
a similar fade effect for the all-apps and more-docs menus as for
the panel menus.

https://bugzilla.gnome.org/show_bug.cgi?id=620775
2010-06-09 17:07:10 +02:00
Florian Müllner
8da5c5f50e Remove incorrect parameter
Commit 730681aabc calls ClutterActor.hide() with a parameter, which
is wrong, but managed to sneak in when rebasing.
2010-06-06 21:43:03 +02:00
Florian Müllner
730681aabc [Overview] Lightbox workspaces on menu popup
Overlay a translucent rectangle to dim the workspaces/dash rather
than setting the workspaces' opacity.
Also slightly darken all lightboxes.

https://bugzilla.gnome.org/show_bug.cgi?id=602466
2010-06-06 19:05:19 +02:00
Florian Müllner
a57a34c540 [linearView] Zoom out when dragging an item from the dash
When dragging windows in linear view, the workspace zooms out to
allow moving the window to other workspaces. Enable the same
behaviour for items dragged from the dash.

https://bugzilla.gnome.org/show_bug.cgi?id=618055
2010-05-27 12:12:10 +02:00
Florian Müllner
03a0809e39 Use St.Group where appropriate
There are some places in the code where we use both fixed positioning
and CSS. Currently we use either a combination of ClutterGroup and StBin,
or we uses StBoxLayout with fixed positioning. Replace those with the new
StGroup container.

https://bugzilla.gnome.org/show_bug.cgi?id=613907
2010-05-25 23:03:14 +02:00
Marina Zhurakhinskaya
6098dca0f8 Always hide the info bar after a short timeout
We no longer want to keep the info bar showing for as long as the user is
in the overview. We also want a shorter timeout.
2010-05-12 16:44:49 -04:00
Christina Boumpouka
21ff050a40 Add a new way to open an application on a new workspace
Allow using the middle mouse button to open a new instance of an
application on a new workspace. The middle mouse button function
can be achieved by clicking the left and right mouse buttons
together with a two buttons mouse or holding Ctrl while clicking
with a single button mouse.

https://bugzilla.gnome.org/show_bug.cgi?id=591645
2010-05-12 20:30:00 +02:00
Dan Winship
cfea0649d8 remove some Big references from places that don't need them any more
https://bugzilla.gnome.org/show_bug.cgi?id=614516
2010-04-06 08:17:33 -04:00