Commit Graph

141 Commits

Author SHA1 Message Date
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
Giovanni Campagna
ad71b969b2 Workspace: fix stacking of window clones
We must set the stack above property of window clones, or they will
not stack themselves properly when a drag is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=694292
2013-02-20 20:56:58 +01:00
Florian Müllner
0e12215614 workspace: Remove zooming of window previews
Using the scroll wheel to switch workspaces makes sense, but it is
currently only supported on the workspace switcher, as it conflicts
with window zooming in the picker.
As changing workspaces is far more useful than the zoom feature,
remove the latter in order to "free" the scroll wheel for workspace
switching.

https://bugzilla.gnome.org/show_bug.cgi?id=686639
2013-02-20 20:17:19 +01:00
Adel Gadllah
4b3c9e826d workspace: Don't use grid layout
Right now we arrange the window thumbnails in a grid if there are more than two
rows of them. This was originally intended to reduce the amount of noise in the
thumbnail arrangement. It also made sense when the thumbnails were of a similar
size.

Nowadays we reflect the size of windows in the size of the thumbnail. This
leads to huge amounts of space between some windows when they are grid aligned.
Removing the grid alignment would also lead to larger thumbnails.

https://bugzilla.gnome.org/show_bug.cgi?id=694210
2013-02-20 00:44:37 +01:00
Adel Gadllah
3430012136 overview: Don't display minimized windows differently in the overview
Making them not fully opaque just makes them harder to see and there is no reason why the user should care whether the window is minimized or not when
switching to a window display them like any other windows.

https://bugzilla.gnome.org/show_bug.cgi?id=693991
2013-02-18 19:40:48 +01:00
Adel Gadllah
9936f97fcb overview: Sort windows by travel distance within rows
Sort windows inside the rows by there travel distance.

https://bugzilla.gnome.org/show_bug.cgi?id=690313
2013-02-18 12:02:22 +01:00
Giovanni Campagna
5c7f0a0ad8 WindowOverlay: remove animations when relayouting
If WindowOverlay.relayout() is called without animation, we must stop
any preexisting animation, otherwise it will continue to run with the
previous parameters and cause the overlay to end up in the wrong position.

https://bugzilla.gnome.org/show_bug.cgi?id=693970
2013-02-16 19:08:02 +01:00
Cosimo Cecchi
bc75e5ec44 workspace: include the close button overlap in the right side chrome
As we do for the top side; the border is overlaied in the top/right
corner.

https://bugzilla.gnome.org/show_bug.cgi?id=682050
2013-02-14 18:18:22 -05:00
Cosimo Cecchi
3d8a87563d workspaceThumbnail: pack ThumbnailsBox in the overview directly
Use a SlidingControl subclass and pack that in the overview group
directly.

https://bugzilla.gnome.org/show_bug.cgi?id=682050
2013-02-14 18:18:21 -05:00
Jasper St. Pierre
d2c45f428f workspace, workspaceThumbnail: Fix another bad rebase
It seems I pushed an old version of the patch by accident.
2013-02-07 02:31:52 -05:00
Jasper St. Pierre
f738c2be9d main: Remove isWindowActorDisplayedOnWorkspace
We now have a convenience method in mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=691746
2013-02-07 01:36:31 -05:00
Jasper St. Pierre
0335f2726a workspace: Use mutter's work area calcuating rather than doing it manually
https://bugzilla.gnome.org/show_bug.cgi?id=692680
2013-02-06 22:35:10 -05:00
Florian Müllner
f4626cf8ad workspace: Make previews of minimized windows translucent
Because the comment says so! Seriously, Jakub suggested this after
bug 682887 brought back a rebranded default shortcut for minimize.

https://bugzilla.gnome.org/show_bug.cgi?id=692999
2013-02-01 14:54:38 +01:00
Jasper St. Pierre
ef69c228fd workspace: Use a better algorithm for computing individual thumbnail scale
The one we had before could make unmaximized windows appear to be bigger
than maximized ones, for a few reasons. Ensure that this doesn't happen
again, and add some comments to explain the whys and needs for twiddling
the individual thumbnail size.

https://bugzilla.gnome.org/show_bug.cgi?id=686944
2013-01-24 15:14:03 -05:00
Jasper St. Pierre
7ba0f07732 workspace: Clamp individual maximized scales to WINDOW_CLONE_MAXIMUM_SCALE
We clamp the overall layout's scale to WINDOW_CLONE_MAXIMUM_SCALE, but since
we do a bit of tweaking to try and make super small windows a tad larger, it's
theoretically possible that windows may become larger than the proper maximum
scale. Fix this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=686944
2013-01-24 15:13:54 -05:00
Giovanni Campagna
27ad8305e5 Overview: apply extra padding to windows in external monitor
Add an style class targetting workspaces located outside the overview,
and use it for extra padding around the window clones. Padding is passed
down and applied inside LayoutStrategy, consolidating code that previously
handled the bottom side only.

https://bugzilla.gnome.org/show_bug.cgi?id=690171
2013-01-18 20:58:07 +01:00
Florian Müllner
3f29680fb6 workspace: Use MetaButtonLayout to get side of close button
The current code parses the button-layout setting because MetaButtonLayout
was not usable from introspection. With that fixed, we can switch to
using meta_prefs_get_button_layout().

https://bugzilla.gnome.org/show_bug.cgi?id=689263
2013-01-10 00:08:55 +01:00
Jasper St. Pierre
770ff19313 workspace: Add smooth scrolling support to zoom windows
https://bugzilla.gnome.org/show_bug.cgi?id=687573
2012-12-20 08:40:05 -05:00
Giovanni Campagna
944762ac83 WindowOverlay: fix title sizing
After the first time the title was placed, we were setting its width,
thus forcing get_preferred_width() to return that as the minimum and
natural width.
To workaround that, explicitly reset the width to -1, -1, causing
StLabel->get_preferred_width() to be called, which would give us a meaningful
value for minimum and natural width.

https://bugzilla.gnome.org/show_bug.cgi?id=688234
2012-12-18 16:00:54 +01:00
Giovanni Campagna
c66068c435 Workspace: fix window clone slot reporting
WindowOverlay was at times seeing bogus values reported as WindowClone
sizes. Fix that by storing and passing the value from the authoritative
source, that is, the LayoutStrategy.

https://bugzilla.gnome.org/show_bug.cgi?id=688234
2012-12-18 16:00:54 +01:00
Giovanni Campagna
d479c936b8 Workspace: miscellaneuous cleanups
Use a single GSettings object for all layout changes of window overlays,
and avoid quadratic behavior for window positioning.

https://bugzilla.gnome.org/show_bug.cgi?id=650843
2012-12-18 16:00:54 +01:00
Giovanni Campagna
96f44e1959 WindowOverlay: animate the close button together with the border
Since the introduction of overlay hover borders, there has a been
a timing disconnection between hiding the border and button, and
this creates noise and reduces the effect of the window+overlay
as a single unit.
Solve that by animating the close button too, so that the two actors
are shown and hidden always at the same time.
Also, consolidate the code to make it clear to future authors that
those two items need to stay coordinated.

https://bugzilla.gnome.org/show_bug.cgi?id=688966
2012-11-24 18:55:47 +01:00
Giovanni Campagna
a370697385 Workspace: Highlight window clone and caption when hovered
Windows in the overview should be highlighted when hovered, to indicate
they are an active target.

Based on a patch by Marc Plano-Lesay <marc.planolesay@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=665310
2012-11-20 18:01:11 +01:00
Stéphane Démurget
86596749fa Revert "overview: highlight windows on launcher hover"
This reverts commit 76229a3601.

Pushed by accident.
2012-11-07 00:33:32 +01:00
Stéphane Démurget
76229a3601 overview: highlight windows on launcher hover
When in the overview, if you move the mouse cursor over one of the
application launchers in the dash, all the unrelated windows are dimmed
both both in the window view and in the workspace view.

It helps to easily understand whether or not there are already opened
windows for this application, and where they are. It can also help in
differentiating the windows in the overview (sometimes the thumbnails
aren't precise enough to easily know which thumbnail belongs to which
application).

https://bugzilla.gnome.org/show_bug.cgi?id=657315
2012-11-07 00:27:31 +01:00
Giovanni Campagna
687e1eabed Overview: Resize the window title labels on content change
Reposition the window overlay when the title changes, using the current
transformed size of the window clone.
Includes a test that changes title to a string of random length every 3 seconds.

Based on a patch by Alex Hultman <alexhultman@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=620874
2012-10-27 18:18:48 +02:00
Jasper St. Pierre
667019a8c1 workspace: Don't relayout windows when zooming workspace thumbnails
It looks ugly and busy to have windows shuffle around when I just wanted
to look at my workspaces.

https://bugzilla.gnome.org/show_bug.cgi?id=582650
2012-10-23 15:12:45 -04:00
Jasper St. Pierre
d9b46b4782 workspace: Use all available space for windows in window selector
Change the layout strategy to be more like the mockups. With less than
two rows of windows, we try to fit every window in a non-aligned situation;
with more than three rows of windows, we try to fit every window in an
aligned situation.

Based heavily on a patch from Pierre-Eric Pelloux-Prayer <pelloux@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=582650
2012-10-23 15:12:45 -04:00
Jasper St. Pierre
6851c5443a workspace: Refactor code a bit
https://bugzilla.gnome.org/show_bug.cgi?id=582650
2012-08-23 23:36:25 -03:00
Jasper St. Pierre
3776c50986 workspace: Position windows only when needed
Right now, when entering the overview, we compute the window slots about
four or five times, from scratch each time. Move to a queued system where
extraneous calls to positionWindows don't matter.

https://bugzilla.gnome.org/show_bug.cgi?id=582650
2012-08-20 18:22:49 -04:00
Jasper St. Pierre
4ff0697ee7 workspace: Reindent
https://bugzilla.gnome.org/show_bug.cgi?id=582650
2012-08-20 18:22:49 -04:00
Marina Zhurakhinskaya
4e6fa56c87 screenShield: add initial functionality
We are replacing the gnome-screensaver module with with a screen shield
that is part of gnome-shell.

This patch fades out the screen on idle and shows a shield with a background
image when there is activity again. The shield can be removed with a key or
button press.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Florian Müllner
0804cefbee workspace: Minor cleanup
_hideAllOverlays() has only been used in a single place for quite
some time now, so move its code into the caller and save a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=678416
2012-06-19 18:24:52 +02:00
Florian Müllner
2404d2935d workspace: Remove unused method
This one hasn't been used for quite a while now ...

https://bugzilla.gnome.org/show_bug.cgi?id=678416
2012-06-19 18:24:51 +02:00
Stefano Facchini
963c6ae567 workspace: Use the position hints when available also for the window overlay
Otherwise when dropping a window in the current workspace the overlay will
appear from the top left corner.

https://bugzilla.gnome.org/show_bug.cgi?id=674323
2012-04-24 22:37:19 +02:00
Stefano Facchini
6304169926 workspace: hide the overlay for a zoomed window when exiting the overivew
Otherwise it remains visible until the overview animation is completed.

https://bugzilla.gnome.org/show_bug.cgi?id=674323
2012-04-24 22:37:19 +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
Stefano Facchini
62b65a25d8 workspace: fix dragging of window thumbnails
Clear the ClutterClickAction state before starting the drag,
otherwise it will eat the first button event after the drag,
preventing a new drag from being started.

https://bugzilla.gnome.org/show_bug.cgi?id=662386
2012-01-22 06:06:35 -05:00
Vit Stanislav
64baea1693 Workspace: Set a maximum scale for window clones
If there's a single small window (e.g. empathy chat) in the overview, it
looks usable, because it's as big as outside of the overview, but when
you start to type, overview search is launched, which is confusing.

Fix that by setting maximum scale for window clones to 0.7

https://bugzilla.gnome.org/show_bug.cgi?id=646704
2012-01-15 16:25:18 +01:00
Vit Stanislav
b88b743428 Delay rearrangement when cursor hovers a window
In overview when closing a window and afterwards dragging a window it can
happen that you pick a wrong window or no window if windows' positions is
updated while initiating the drag.
Fix that by delaying window rearrangement when cursor is over a window.

https://bugzilla.gnome.org/show_bug.cgi?id=645325
2012-01-15 16:22:53 +01:00
Florian Müllner
8a6a3968c3 workspace: Remove tweens when hiding overlays
The window overlays may be shown erroneously if hideOverlays is
called while the corresponding clone has an uncompleted tween which
calls showOverlays in its onComplete handler, for instance when
quickly leaving the overview before the initial overview animation
has finished. To fix, remove all existing tweens when hiding the
overlays.

https://bugzilla.gnome.org/show_bug.cgi?id=666020
2011-12-12 20:02:51 +01:00
Zan Dobersek
102f2a91f9 Make the window labels visible at all times
When in overview, window labels flicker or are temporarily hidden on a
number of occasions - when simply clicking around the area the windows
are displayed in, dragging a window, sliding in the workspace list,
adding new workspaces etc. This patch makes the label for any window
visible at any given moment when in overview and the said window is
not being dragged around.

https://bugzilla.gnome.org/show_bug.cgi?id=644861
2011-12-08 14:15:13 +00:00
Florian Müllner
f2c79be11a workspaces-display: Make workspacesView private
WorkspacesDisplay was introduced to manage the workspace objects
and views; however, the overview still accesses the view held
by the workspacesDisplay directly, which is a bit odd.
Add some additional methods needed by the overview, and make the
view a private property.

https://bugzilla.gnome.org/show_bug.cgi?id=652580
2011-12-01 17:55:13 +01: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
a9ab8784c4 Adapt to mutter moving to GSettings
https://bugzilla.gnome.org/show_bug.cgi?id=663429
2011-11-11 20:32:43 +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
Florian Müllner
7bc2573d85 window-clone: Use ClutterClickAction
Right-click menus in the dash can be dismissed by clicking anywhere
outside the menu. However, if a window clone is located beneath the
pointer when doing so, the window is activated and the overview
closed.
The cause of this unexpected behavior is that window previews are
activated on button-release, which is delivered to the preview after
the menu releases its grab on button-press. Use a ClutterClickAction
instead and let Clutter do the right thing, i.e. only trigger a
'clicked' signal when a button-release event is matched by a
corresponding button-press event.

https://bugzilla.gnome.org/show_bug.cgi?id=661151
2011-10-11 12:56:34 +02:00
Florian Müllner
1cf64b5471 workspace: Fix activating windows from xdnd operations
Commit e5bc3a2ba8 changed the hierarchy of WindowClone, which
broke activating windows on hover during xdnd operations. To
avoid intrusive changes, just hide the new actor from picks so
that DND operations pick the actor actually meant to represent
the corresponding window.

https://bugzilla.gnome.org/show_bug.cgi?id=658640
2011-09-14 10:00:46 +02:00
Jasper St. Pierre
e5bc3a2ba8 overview: Compensate for the window's invisible borders
https://bugzilla.gnome.org/show_bug.cgi?id=656335
2011-08-29 19:16:52 -04:00
Colin Walters
4886275df4 ShellApp: Change activation API
Since almost all of the callers of shell_app_activate were using the
default workspace (by passing -1), remove that parameter.

Add a new shell_app_activate_full() API which takes a workspace as
well as a timestamp; previously we might have been ignoring event
timestamps from elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=648149
2011-08-11 05:35:23 -04:00