Commit Graph

91 Commits

Author SHA1 Message Date
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
Dan Winship
88e68dec21 Let small windows appear at full size in the overlay if there is room
Previously we forced all windows to shrink at least as much as the
workspace itself did. Now we allow to shrink by a smaller amount (or
not at all) if they'll still fit within their allotted slot.

http://bugzilla.gnome.org/show_bug.cgi?id=571192
2009-05-05 15:35:04 -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
Sander Dijkhuis
7c8cb8450c Bug 578584 - Use the wallpaper for the overlay background
The overlay looks nicer with the root window pixmap drawn on the
background. It is scaled up to twice the size, with positioning
based on the rule of thirds.

The sideshow animations shown when entering or leaving the
overlay and toggling the extended view were implemented by
Marina Zhurakhinskaya. They replace the old method of having a
black rectangle behind the workspaces that partly covers the
sideshow during transitions.

configure.ac: Add gdk-x11, clutter-x11 and clutter-glx modules.
overlay.js: Add a root window pixmap actor, make sideshow width
    definitions more logical, replace the way the sideshow
    animates when entering or leaving the overlay.
workspaces.js: Remove the backdrop, add helper functions for the
    overlay transitions.
shell-global.[ch]: Add a method that creates an actor displaying
    the root window pixmap and returning clones of it.
2009-04-22 02:46:36 +02:00
Dave Jordan
a074ef5d7c Use a grid pattern in overlay if more than 6 windows
The diagonal arrangement currently used in the overlay when there are
more than 6 windows is hard to read and hides most of the previews.
Both of these issues are fixed by arranging the windows in a grid pattern.

http://bugzilla.gnome.org/show_bug.cgi?id=576269
2009-03-31 18:58:46 -04:00
Marina Zhurakhinskaya
c018b7652f Don't add windows to overlay workspaces when overlay is being exited.
When a window is added while overlay is being exited (e.g. because
some application was launched), we don't want to add that window to
the workspace's window clones. Previously, the window clone was added
and an animation to place the windows to their overlay workspace view
positions was triggered, which resulted in the wrong animation being
shown and an abrupt change in window positions when the actual workspace
was shown.

Add a boolean argument to two _positionWindows() calls that were missing
an argument.
2009-03-17 18:33:54 -04:00
Marina Zhurakhinskaya
8aa56e373f Bug 574691 – Stay in the overlay mode after drag and drop
Just calling launch() on the item instead of activate(), launches the item but doesn't close the overlay mode.
2009-03-10 13:37:01 -04:00
Owen W. Taylor
0f7abf96a7 Port to Clutter-0.9
tools/build/gnome-shell.modules: Point  at master branch of Clutter (0.9)
  and make gobject-introspection a dep of Clutter.
configure.ac src/Makefile.am: Use Clutter-0.9
js/ui/button.js js/ui/genericDisplay.js js/ui/overlay.js js/ui/panel.js
js/ui/runDialog.js js/ui/workspaces.js src/shell-status-menu.c:
  Use ClutterText instead of ClutterLabel and ClutterEntry
js/ui/workspaces.js js/ui/genericDisplay.js: Use ClutterClone instead
  of ClutterCloneTexture
src/shell-global.[ch]: Add Shell.get_event_key_symbol() to workaround
  unaccessibility of clutter_key_event_symbol() to use.
js/runDialog.js js/overlay.js: Use Shell.get_event_key_symbol() as
  appropriate.
2009-02-23 14:53:06 -05:00
Jonathan Matthew
0eb4873ba0 Bug 572384 - can't select windows that are on all workspaces in the overlay
Workspace._onCloneSelected doesn't need to ask the window which
workspace it's on, it can just use its own workspaceNum field.
2009-02-20 00:02:49 +10:00
Marina
2d3988c5fc Bug 570579: Redo the layout of overlay components
Divide the screen into a grid and use it to determine the layout of the overlay components in a more consistent manner.

Remove the 'Add workspace' control and slide the workspaces
display to the side without scaling it when switching to the 'More' mode.
2009-02-10 17:38:06 -05:00
Dan Winship
11561fd902 Abstract drag-and-drop a bit and add application/recent document DND. #569717 2009-02-10 11:20:48 -05: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
Colin Walters
34f5adc9c0 Ignore newly added non-overlay windows
This prevents e.g. the popup menu from statusmenu from appearing
as a toplevel window.

svn path=/trunk/; revision=185
2009-02-04 22:40:24 +00:00
Dan Winship
48e578ddaa Small fix for when a new window is added just before leaving the overlay
svn path=/trunk/; revision=182
2009-02-04 18:24:20 +00:00
Dan Winship
4850ea608f Track window adds/removes in the overlay. #568983
svn path=/trunk/; revision=180
2009-02-04 14:50:50 +00:00
Marina Zhurakhinskaya
e9826ecb45 Add a 'More' control to the applications display in the overlay
mode. When this control is clicked, documents display section slides down,
workspaces display slides to the side, and a multi-column applications view is
presented to the user. "More' control is replaced with a 'Less' control. When
the 'Less' control is clicked a default overlay view is restored.

Clean up positioning of the components of the overlay sideshow
and the items within generic item displays.


svn path=/trunk/; revision=179
2009-02-03 22:58:33 +00:00
Dan Winship
87a3088719 sort imports consistently; everything-but-our-javascript, alphabetically,
then a blank line, then all of our javascript, alphabetically

svn path=/trunk/; revision=176
2009-02-02 23:02:16 +00:00
Dan Winship
489f3306e6 Fix a crash deleting a workspace, and another crash if the user tries to
select a workspace after deleting it.

svn path=/trunk/; revision=174
2009-02-02 20:54:33 +00:00
Dan Winship
f35ee1a5a0 oops, remove Workspace._makeDesktopRectangle, it's unused now
svn path=/trunk/; revision=173
2009-01-29 21:25:35 +00:00
Dan Winship
5def603e86 Move window clone functionality into its own class
svn path=/trunk/; revision=172
2009-01-29 21:21:50 +00:00
Dan Winship
7ca77dccc9 Do window dragging in the stage, not in the original workspace's actor
svn path=/trunk/; revision=171
2009-01-29 21:21:23 +00:00
Dan Winship
54337ee6a9 Two dragging-related fixes
- Don't let the user grab a moving window or we'll get dueling tweens.
    - Update _overlappedMode each time _positionWindows is called

svn path=/trunk/; revision=170
2009-01-29 21:20:37 +00:00
Dan Winship
c86ce82921 fix a bug in the snap-back animation by turning it into a less-noticeable bug
svn path=/trunk/; revision=166
2009-01-27 20:05:55 +00:00
Owen Taylor
9b89ba6270 Allow windows to be dragged to other workspaces
* Make updating of the clone title more of a state-machine - instead
  of showing/hiding/creating/raising the title all over the code, have a
  single Workspace._updateCloneTitle() method that looks at state bits and
  decides if the clone should be hidden or shown, and updates the
  stacking and position.

* Move code to positioning of windows within a workspace in the overlay
  modeto a new method Workspace._positionWindows()

* Add Workspace.addWindow()/removeWindow() to add and remove windows
  from the workspace on the fly. (Triggered manually: we still don't
  handle external changes to windows when the overlay is up.)

* Hook up mouse-dragging for window actors and add a
  ::window-dragged signal to Workspace

* Connect to ::window-dragged for each workspace, compute the new
  workspace, move it the window there, and animate everything into the
  new position. Snap back to the old location if the window didn't move.

http://bugzilla.gnome.org/show_bug.cgi?id=568753

svn path=/trunk/; revision=164
2009-01-23 19:21:20 +00:00
Dan Winship
90bce45ec6 fix workspaces padding a little. (it's still not quite right)
svn path=/trunk/; revision=160
2009-01-21 21:59:58 +00:00
Dan Winship
0d612b7954 Highlight the current workspace in the overlay view
Needs cooler-ness.

svn path=/trunk/; revision=158
2009-01-21 21:12:49 +00:00
Dan Winship
136ce3257d Clean up Workspace animation. #567865
Use Tweener.registerSpecialPropertyModifier to handle moving windows in
straight lines on the screen even while their parent workspaces are also
moving.

Have the remove buttons track their parent workspace scale and deal with
it automatically rather than having special cases in each Workspace method.

svn path=/trunk/; revision=157
2009-01-21 20:35:20 +00:00
Dan Winship
9a00ab1594 add a missing ";"
svn path=/trunk/; revision=155
2009-01-20 18:20:41 +00:00
Colin Walters
12b10342e0 Fix closing of loop variable which caused error messages
Can't close over loop variables in that way; need to define an explicit var.

Also fix case where no title is defined yet when attempting to adjust.

svn path=/trunk/; revision=154
2009-01-20 16:13:41 +00:00
Colin Walters
5afcf07782 Merge branch 'workspace-salon'
Conflicts:
	src/shell-global.c

svn path=/trunk/; revision=152
2009-01-19 23:06:59 +00:00
Dan Winship
b3aaf2ced5 Add (+) and (-) icons for workspace management to the overlay
svn path=/trunk/; revision=137
2008-12-22 22:06:47 +00:00
Dan Winship
40a3fdc02e split out a Workspace class from Workspaces, reorganize for that
svn path=/trunk/; revision=135
2008-12-22 21:51:34 +00:00
Dan Winship
45ba65bebb Move Workspaces-size computation into Workspaces
svn path=/trunk/; revision=134
2008-12-22 21:50:23 +00:00
Owen Taylor
749d356ef9 Remove accidentally introduced import of GtkClutter
An unused import of GtkClutter snuck in somehow, remove it.

svn path=/trunk/; revision=131
2008-12-18 22:16:51 +00:00
Colin Walters
f059492a20 Add full size icon+title to overlay
The icon+text is useful in order to distinguish between windows
that might look similar otherwise.

The implementation is not optimal:

* We create a new texture from the pixmap each time

http://bugzilla.gnome.org/show_bug.cgi?id=563406

svn path=/trunk/; revision=129
2008-12-18 18:50:09 +00:00
Dan Winship
8c59c2b5bf Track changes to the screen's n-workspaces property, and add and remove
workspaces from the overlay as needed. #564181

svn path=/trunk/; revision=127
2008-12-15 21:03:07 +00:00
Dan Winship
97ae22dae5 Use a stable workspace ordering as rows and columns are added, rather than
just doing a simple row-major ordering

svn path=/trunk/; revision=126
2008-12-15 20:58:10 +00:00
Dan Winship
d07433d445 change the workspace zooming metaphor in the overlay
svn path=/trunk/; revision=125
2008-12-15 20:55:24 +00:00
Dan Winship
249e65ee30 Make the workspaces view a temporary "widget", rather than having it always
around

svn path=/trunk/; revision=124
2008-12-15 20:48:59 +00:00
Dan Winship
68190e4073 remove debug thing
svn path=/trunk/; revision=117
2008-12-04 15:22:51 +00:00
Dan Winship
03e8db6a00 fix "desktop"/"workspace" naming confusion
svn path=/trunk/; revision=116
2008-12-04 15:20:37 +00:00