Commit Graph

61 Commits

Author SHA1 Message Date
Owen W. Taylor
0d32017ffc Don't switch to a workspace when dragging it to launch on that workspace
With workspace thumbnails, we don't switch workspaces when dragging windows
between workspaces or adding new workspaces, so we also shouldn't switch
on launch.

 * Add workspace parameters to shell_doc_system_open(),
   shell_app_activate, shell_app_open_new_window()

 * Pass a 'params' object when activating items in the overview with
   two currently defined parameters: workspace and timestamp. (timestamp
   is only implemented where it is easy and doesn't require interface
   changes - using the global current timestamp for the shell is almost
   always right or at least good enough.)

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:21 -05:00
Owen W. Taylor
3c593fc056 Don't check for Workspaces.WindowClone for window drops
When checking the type of a DND source, instead of checking
'instanceof Workspaces.WindowClone' accept any actor with realWindow
and metaWindow properties. This will be useful to support a separate
type of actor dragged from workspace thumbnails.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Maxim Ermilov
2792ad1cf4 chrome: try find fullscreen windows only on current workspace
https://bugzilla.gnome.org/show_bug.cgi?id=641677
2011-02-08 23:43:35 +03:00
Florian Müllner
00df20c618 window-clone: Fix signal connections when the window is closed
Commit 91d8a32f25 let WindowClone forward the size-changed signal
of the "real" window, disconnecting the signal handler when the
clone is destroyed. In case the clone was destroyed due to the
MetaWindowActor being closed, this results in a warning
(gsignal.c:2392: instance `0x2a3fac0' has no handler with id `2955').

Handle the case where the original window is destroyed before its
clone.
2011-02-03 19:38:57 +01:00
Maxim Ermilov
91d8a32f25 workspace: make WindowClone forward the 'size-changed' event
https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-02-01 23:41:16 +03:00
Florian Müllner
e2e90a550e Overview: Adjust to window size changes
Windows may change their size while the overview is open, e.g. when
switching panels in the control center. Make sure that the preview's
position and overlay are updated in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=640560
2011-01-25 21:53:33 +01:00
Florian Müllner
d64d491f63 workspaces-view: Use overview swipe-scrolling
Remove the swipe-scrolling implementation in WorkspacesView and
use the new overview facility.

https://bugzilla.gnome.org/show_bug.cgi?id=635034
2011-01-24 02:59:39 +01:00
Adel Gadllah
7279cc1db8 Overview: Remove invisible animations
Given that the grid view is gone there is no point in animating the
window previews on all workspaces anymore so just do it for the current
one avoid taking a slow down caused by animating windows on other workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=637353
2010-12-16 20:24:08 +01:00
Adel Gadllah
e41b0bc16d Remove unused workspace._visible property 2010-12-16 20:23:45 +01:00
Milan Bouchet-Valat
43d479c786 Don't pass an (out) argument to meta_window_get_outer_rect()
Mutter now has the needed (out) annotation, so we have to use the
return value instead of passing a reference to a rectangle.
2010-12-01 22:43:02 +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
0942f50781 workspaces-view: Remove MosaicView
The new layout does no longer support view switching, so merge
GenericWorkspacesView and SingleView, and remove MosaicView.
Also rename or remove workspace properties and functions which
are now unused.
The grid will have a comeback with the new DND behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +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
01e7d6f30e workspace: Simplify the close button's timeout handler
Clutter actor gained a :has_pointer property after the original
code was written, so use this instead of picking.
2010-11-24 19:04:15 +01:00
Owen W. Taylor
e5a802bf99 Use the new "background actor" functionality in Mutter
The code to draw the root background has now been moved into Mutter,
with added smarts to not draw obscured portions. Remove the old
version of the code and clone the Mutter background actor to draw
the background in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634836
2010-11-18 14:03:37 -05: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
Dan Winship
8886b7433c StThemeNode: simplify use of get_color/get_double/get_length
Although within St itself there are situations where the semantics of
these functions (return TRUE or FALSE and return the actual value in
an out parameter) is useful, it's mostly just annoying at the
application level, where you generally know that the CSS property is
going to specified, and there is no especially sane fallback if it's
not.

So rename the current methods to lookup_color, lookup_double, and
lookup_length, and add new get_color, get_double, and get_length
methods that don't take an "inherit" parameter, and return their
values directly. (Well, except for get_color, due to the lack of (out
caller-allocates) in gjs.)

And update the code to use either the old or new methods as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=632590
2010-10-21 15:02:33 -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
38c3422331 [DND] change cursor when dragging
Return a DND.DragMotionResult constant from delegate _handleDragMotion
methods as well as the existing return value from the drag monitor method dragMotion.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-09-10 06:00:28 +04:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Florian Müllner
6e09cc5fc8 Fade in alt-tab popup, adjust timings
The design calls for item to not appear abruptly, but not too slow
either - 100ms seems to be a good sweet spot for elements which are
supposed to appear "instantly".
Add a fade effect to the alt-tab popup and set the timings for other
fade effects to 100ms.

https://bugzilla.gnome.org/show_bug.cgi?id=621247
2010-06-16 20:55:26 +02:00
Dan Winship
748739ed9c [appDisplay] port from ShellMenu to PopupMenu
This fixes the style, and also makes it keyboard navigable

https://bugzilla.gnome.org/show_bug.cgi?id=619541
2010-06-10 15:04:48 -04: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
3e2a9a57a1 [dnd] Optionally restore the drag actor
Currently, the drag and drop code assumes that on a successful drop
the target will either consume the drag actor or that it is otherwise
OK to destroy the actor.
As the drag behavior for window preview was changed, dropping a preview
on the dash now results in the preview being swallowed - to fix, add an
option to restore the actor in case of a successful drop as well.

https://bugzilla.gnome.org/show_bug.cgi?id=619203
2010-05-26 14:06:53 +02: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
0e9c47bd56 [overview] Fix positioning of single small windows
A single window that does not need to be scaled down, should be centered
and not placed at the bottom.

To avoid blurryness window positions should be pixel aligned.

https://bugzilla.gnome.org/show_bug.cgi?id=617827
2010-05-09 14:18:42 +02:00
Florian Müllner
082a15bbc5 [linearView] Cleanup workspace scrolling and zooming
Centralize the update of actor visibilities (overlays, shadows,
off-screen workspaces). Adjust the way scrolling is handled so
that it works correctly with removed workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=610191
2010-05-05 21:20:29 +02:00
Colin Walters
4a0fbf03a8 [workspaces] Only allow mouse clicks to swich for empty workspaces
Allowing it in the case of 1 window is weird - it makes it feel
like a bug when you go from 1 to 2.
2010-04-16 17:24:54 -04:00
Dan Winship
d42263c1bc Change shell_global_get_modifier_keys to shell_global_get_pointer.
We can't use gdk_display_get_pointer/gdk_window_get_pointer from gjs
when XKB is active. We already had a wrapper that did the
get-modifier-state part of that, but some places also need the
get-pointer-location part of it. So update our wrapper to return both,
and update js code to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=613428
2010-04-08 14:51:45 -04:00
Dan Winship
1d2f0e0e15 workspace.js: remove some dead code
The original window dnd code needed to track whether or not the
pointer was in the clone. Some later rewrite made this unnecessary,
but we were still keeping track anyway.
2010-04-08 14:51:45 -04: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
Florian Müllner
8b3d4857aa [Overview] Postpone window repositioning while zooming
After closing a window, the remaining previews are repositioned
after a timeout; when it is called while the user zooms a preview,
the window positions get all messed up, so postpone the positioning
in this case until the zoom ends.

https://bugzilla.gnome.org/show_bug.cgi?id=613536
2010-03-24 19:38:57 +01:00
Owen W. Taylor
2a740448e1 [workspaces] Don't use a clone for the window drag actor
Using a clone for the drag actor causes the animation into
the final position not to work as expected; instead use
the newly added DND parameters to change the original
drag actors size and opacity. (This reverts the change in
011db9f).

Since we are using the original actor, we have to be careful
not to change it during the drag, so don't actually position
dragged window actors in Workspace.positionWindows().

https://bugzilla.gnome.org/show_bug.cgi?id=613367
2010-03-23 11:32:16 -04:00
Florian Müllner
5a6c9f176e Animate workspace view switches
Replace the hard switch between linear and mosaic workspace view
with a an animated transition between the views.

https://bugzilla.gnome.org/show_bug.cgi?id=610191
2010-03-18 23:47:56 +01:00
Florian Müllner
a9fea8248c Don't destroy and recreate workspaces on view switches
Currently, the workspace objects are destroyed and recreated on
view switches. Instead, keep the objects around and reparent the
workspace actors on view switches.

https://bugzilla.gnome.org/show_bug.cgi?id=610191
2010-03-18 23:47:55 +01:00
Colin Walters
b7c6ec4b46 [workspace] Ensure we emit drag-end if we're in a drag during a destroy
Showing the window overlay relies on drag-end being emitted, so do so if we're
in a drag.
2010-03-18 16:58:16 -04:00
Maxim Ermilov
46bce04788 Fix JSObject leak in workspace.js
https://bugzilla.gnome.org/show_bug.cgi?id=612318
2010-03-18 03:27:42 +03:00
Florian Müllner
ee57dab846 [Workspace] Disconnect reposition handler when leaving overview
As the repositioning after closing a window preview is delayed, it is
possible that the timeout is triggered while leaving the overview. In
that case the previews move to the new overview position and are changed
abruptly to the original window position when the overview zoom is done.
To prevent this, disconnect the handler when leaving the overview.
2010-03-17 16:38:03 +01:00
Maxim Ermilov
7183aac362 add ability move window in SingleView
https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-03-16 18:54:56 +03:00
Colin Walters
011db9f34d Shrink windows to small previews when dragging
Hide the original actor during a grab, and create a new
clone.  This is easier than trying to ensure we maintain
the state of the original window clone.

https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-03-16 11:29:44 -04:00
Dan Winship
3ce89e3c80 Add missing semicolons noted by jslint
Taken from a patch by Lex Hider on the mailing list
2010-03-15 09:50:05 -04:00
Adel Gadllah
2016e08f7b Don't activate workspace when more than one window is open
Currently clicking on an empty spot on the workspace actors switches to the workspace, this has a side effect that when for some reason (like using a touchpad),
the user misses the window he intends to open he will end up with the currently focused window instead.

Disable this behaviour if more than one window is open (in that case the user has to explicitly target a specific window).

https://bugzilla.gnome.org/show_bug.cgi?id=610868
2010-03-09 22:35:51 +01:00
Florian Müllner
40b0459174 [Overview] Delay repositioning after closing windows
When closing windows in the window picker, the remaining windows
move to their new positions, which prevents the user from performing
additional actions in the picker until the animation stops and the
user adjusts to the new layout.

Instead we try to be smart and delay the repositioning, either until
the pointer stops moving or until it leaves the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=611167
2010-03-07 23:45:46 +01:00
Florian Müllner
499c5737da [Overview] Base minimum motion on actors
When figuring out where to position window previews, use the clone's
position instead of the the original meta window. There shouldn't be
a difference when entering the overview, but it makes the motion when
opening/closing new windows in the overview tinier and more predictable.

https://bugzilla.gnome.org/show_bug.cgi?id=611167
2010-03-01 19:42:55 +01:00
Florian Müllner
a21ba292eb Cancel zoom of non-focused windows when leaving overview
When leaving the overview by hitting escape or super, all windows animate
to their original positions. Zoomed windows are kept above others until
the animation ends, then the focused window is brought to the front; as
this looks odd if the zoomed window does not have focus, cancel the zoom
in that case before leaving the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=609243
2010-02-22 23:41:09 +01:00
Florian Müllner
5429104f04 Fix problems when leaving the overview with a zoomed window
While zooming, a window clone is reparented to the stage and thus cannot
be destroyed automatically by the "parent" container. To prevent the clone
and the corresponding overlay from leaking, we enforce destroying the clone
with the workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=609243
2010-02-22 23:41:09 +01:00
Florian Müllner
126d02ae90 Fix invalid call to st_widget_get_theme_node() in WindowOverlay
WindowOverlay has two actors, both with custom style properties, which
share a common _onStyleChanged() handler. This is not a problem when
entering the overview, because the actors' parent (the workspaces group)
is hidden while the actors are added. However, when windows are added to
the workspace while in the overview (e.g. when opening a new window or
dragging a window from one workspace to another), adding the first actor
to the workspaces group triggers a style-changed signal - the handler
then calls st_widget_get_theme_node() on both actors, which triggers a
warning as the second actor has not been parented yet.

https://bugzilla.gnome.org/show_bug.cgi?id=610279
2010-02-22 18:33:58 +01:00
Maxim Ermilov
8d76e362a0 _computeWindowMotion calculate difference between relative positions
https://bugzilla.gnome.org/show_bug.cgi?id=607826
2010-02-22 20:14:13 +03:00
Maxim Ermilov
cfd63c7d4c fix selection of all-workspace windows
all-workspace windows can be active on every workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=603078
2010-02-19 21:29:46 +03:00
Maxim Ermilov
49a9335f68 fix sizing of all-workspace windows in the overview
Window can have more then one clones on different workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=603078
2010-02-19 21:29:35 +03:00