Commit Graph

78 Commits

Author SHA1 Message Date
Giovanni Campagna
3a26f7f4d5 WindowManager: WORKAROUND: disable dimming in the overview
Clones and effects don't mix, due to a bug in Clutter we don't
know how to fix, and sometimes the clone is clipped completely.
As a workaround, undim windows with dialogs in the overview.

Clutter bug: https://bugzilla.gnome.org/show_bug.cgi?id=659523

https://bugzilla.gnome.org/show_bug.cgi?id=650843
2014-01-19 16:38:19 +01:00
Giovanni Campagna
8b99617513 WorkspaceThumbnails: show attached modal dialogs togheter with their parents
The window clones in the central part of the overview are showing modal
dialogs now, and this creates an inconsistency if the thumbnail doesn't too.
Code is intentionally similar in the two places.

https://bugzilla.gnome.org/show_bug.cgi?id=650843
2014-01-19 16:37:17 +01:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
751a3f0e94 js: Use SOURCE_CONTINUE/SOURCE_REMOVE constants in source functions
With support for boolean constants in g-i, we can finally use the
more readable constants instead of true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Jasper St. Pierre
e4c07875a3 overview: Send the clone with the window-drag events
This allows clients that care about the actual item we're dragging to
make smarter decisions without adding a drag monitor themselves.
2013-10-30 13:17:38 -04:00
Jasper St. Pierre
37c8132632 workspace: Adapt to mutter API changes 2013-10-15 15:46:36 -04:00
Jasper St. Pierre
ad043e009e workspaceThumbnail: Drop the _background hack
The _background hack was added because the old way the zooming animation
worked, it set the allocation of the workspaces view and thumbnails box
to the final position and used animations to smoothly animate.

During the 3.6 cycle when we added the new search view, Cosimo changed the
way the zoom animation works so that rather than set the final allocation
and animate, we actually do adjust the allocation of the workspaces view
and thumbnails box.

So, as the hack is no longer necessary, we can drop it.

https://bugzilla.gnome.org/show_bug.cgi?id=694881
2013-10-12 14:38:13 -04:00
Jasper St. Pierre
f06dba5007 workspaceThumbnail: Fix trailing whitespace 2013-07-30 18:42:11 -04:00
Bradley Pankow
8dfcee9039 workspaceThumbnail: don't move transient windows for workspaces
When we shift workspaces to create a blank one for a window or
application, all of the window actors are shifted down.  However, some
of these window actors are transient windows attached to a main window.
When these windows are moved to a different workspace, the main window
is moved along with it. When the main window is moved, these windows
are also moved. This creates a double move of the windows.
This double movement leads to unexpected results where workspaces are
collapsed and windows are in incorrect positions.
This patch prevents movement of these transient windows, only grabbing
the main (ancestor) windows to move to a different workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=705174
2013-07-30 18:40:51 -04:00
Jasper St. Pierre
5dabaf2fe9 Fix launching apps / search results in new workspaces by dragging
When I landed the new workspace tracker move, I didn't realize there
was public API being used by clients here. Add that back.

https://bugzilla.gnome.org/show_bug.cgi?id=698593
2013-07-01 13:22:05 -04:00
Ray Strode
18d850d7d6 workspaceThumbnail: always destroy bgManager when destroyed
Right now we only destroy the bgManager object when the
workspaceThumbnail is explicitly destroy with its destroy()
method.

This commit makes sure bgManager gets destroyed when the
workspaceThumbnail actor is destroyed without calling
destroy().

https://bugzilla.gnome.org/show_bug.cgi?id=696157
2013-03-26 17:02:05 -04:00
Giovanni Campagna
ee0040ef1c WorkspaceThumbnails: animate the right workspace when creating by DND
To create a new workspace by dropping on the placeholder, we move all
the windows down one workspace and then wait for _checkWorkspaces() to
automatically create the empty one at the end.
This means that, from the implementation POV, the new workspace is not
the one created by DND but it's the last one, and this detail was exposed
in the UI because the animation was applied on that one.
Fix that by starting the animation manually from the DND code, and then
blocking the animation from happening when the new workspace is created
with a flag.

https://bugzilla.gnome.org/show_bug.cgi?id=685285
2013-03-17 19:35:15 +01:00
Giovanni Campagna
ceae032112 Workspace/WorkspaceThumbnail: fix Clutter warnings from stacking code
Windows can be restacked at any time, including when the stackAbove
property of the window clone is being dragged, and thus parented to
the uiGroup. To do stacking properly, we need to skip it for the duration
of the drag, and sync it again at the end (which is already done by
mutter because of the workspace change)

https://bugzilla.gnome.org/show_bug.cgi?id=685285
2013-03-17 19:26:13 +01:00
Cosimo Cecchi
7d78c42dfc workspaceThumbnails: remove custom scrolling code
Now that we listen to scroll event on the whole overview group, this
makes the thumbnail switcher scroll twice per-event.
2013-02-25 18:23:42 -05: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
Giovanni Campagna
08a0479c9e WorkspaceThumbnail: fix mutter warning
Pass a proper timestamp to workspace activation functions

https://bugzilla.gnome.org/show_bug.cgi?id=694365
2013-02-21 16:10:09 +01:00
Giovanni Campagna
f3df62f27e WorkspaceThumbnail: fix typo in stacking code
Was causing thumbnails to be below the background.

https://bugzilla.gnome.org/show_bug.cgi?id=694227
2013-02-20 01:59:14 +01: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
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
6054ab35cb workspaceThumbnail: Fix bad rebase 2013-02-07 02:27:40 -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
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
Cosimo Cecchi
6c64c0873c workspaceThumbnail: unify restack handling
Both WorkspacesDisplay and ThumbnailsBox need to know when windows have been
restacked. Instead of each tracking changes on their own or trying to call
each other, have the overview keep track and do the calculations, emitting
a signal with the result.

https://bugzilla.gnome.org/show_bug.cgi?id=690175
2012-12-17 13:24:25 +01:00
Cosimo Cecchi
d2c6149923 workspaceThumbnail: handle show/hide when entering/leaving the overview
Handle this internally, instead of having WorkspacesDisplay show/hide
us.

https://bugzilla.gnome.org/show_bug.cgi?id=690175
2012-12-17 13:24:25 +01:00
Tanner Doshier
9f98f6f02d workspaceThumbnail: handle scroll-event internally
Instead of having WorkspacesDisplay calling us.

https://bugzilla.gnome.org/show_bug.cgi?id=690175
2012-12-17 13:24:25 +01:00
Tanner Doshier
2f7c0b1985 workspaceThumbnail: make ThumbnailsBox track workspace changes itself
Instead of having WorkspacesDisplay calling us.

https://bugzilla.gnome.org/show_bug.cgi?id=690175
2012-12-17 13:24:25 +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
Tim Lunn
046067565a workspace: fix typo in removeThumbnails.
https://bugzilla.gnome.org/show_bug.cgi?id=684869
2012-10-12 17:44:10 -04:00
Jasper St. Pierre
4f359e62df workspaceThumbnail: Fix the dynamic workspaces check for dragging
Be able to move windows between workspaces with static workspaces
enabled; the incorrect check here simply disabled all dragging
operations.

https://bugzilla.gnome.org/show_bug.cgi?id=684641
2012-10-02 16:15:23 -03:00
Stefano Facchini
18c62a1987 Make workspace selector more similar to the mockup
This makes the workspace indicator respect the "padding" style attribute.
Also, since we no longer draw the border on top of the thumbnail,
we need to be pixel-precise in allocating the indicator height.

We use this to make the workspace selector more similar to the mockup.

https://bugzilla.gnome.org/show_bug.cgi?id=662087
2012-08-23 21:17:22 +02:00
Stefano Facchini
7dbdf2aa07 workspaceThumbnail: set correct cursor when hovering the drop placeholder
Namely, use the the 'copy' cursor for app launchers and the 'move'
cursor for windows.

https://bugzilla.gnome.org/show_bug.cgi?id=672641
2012-03-30 17:44:39 +02:00
Stefano Facchini
369c1b0a41 workspaceThumbnail: move event handling to ThumbnailsBox
Currently, click and drop events are handled by each WorkspaceThumbnail
instance. With the introduction of the workspace cut and the request
to extend the reactive area of the workspace selector to the edge
of the monitor, it becomes more convenient to do all the event handling
inside ThumbnailsBox, even if this requires some manual layout computation.

https://bugzilla.gnome.org/show_bug.cgi?id=643319
2012-03-19 23:22:00 +01:00
Stefano Facchini
3c6737f738 autoWorkspaces: fix creation of new workspaces with application launchers
In the workspace-collecting code we add a check to avoid collecting a
workspace if any startup sequence is running there. Since the sequence
can take some time to load, an helper function is also added which keeps
the (empty) workspace around for a very short time, while waiting for the
sequence to start.

https://bugzilla.gnome.org/show_bug.cgi?id=664202
2012-03-16 16:41:30 +01:00
Florian Müllner
a197ce6f53 main: Add (hidden) support for static workspaces
The dynamic-workspaces key was introduced to allow us to opt out of
writing the num-workspaces setting (which is ignored with the dynamic
workspace management anyway), but there'll be some expectations that
the setting will have an effect on the UI.
It's actually not very hard to support, so here's to the graybeards ...

https://bugzilla.gnome.org/show_bug.cgi?id=671568
2012-03-11 23:03:44 +01: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
Jasper St. Pierre
bb862e20c0 st: Remove st-group
Now that ClutterActor/StWidget is concrete, we don't need it.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Stefano Facchini
786beccca5 workspaceThumbnail: don't queue unnecessary relayouts
Relayouts are expensive and can make the UI laggy.
2012-02-22 13:43:04 +01:00
Stefano Facchini
c63fe5ee24 workspaceThumbnail: avoid bouncing of the drop placeholder above the first workspace
https://bugzilla.gnome.org/show_bug.cgi?id=664622
2012-02-06 11:16:28 -05:00
Owen W. Taylor
0080440118 workspaceThumbnail: fix window tracking bugs
- We should only call workspaceRemoved() for workspaces that are
  are actually being removed.
- When we have multiple monitors, a window on a secondary monitor is
  on all workspaces, so it ends up in all workspaces _allWindows
  lists, so we can't use previous presence in that list to determine
  whether we need to go ahead and add the actor; allWindows is simply
  the list of windows where we are listening  to notify::minimized.

https://bugzilla.gnome.org/show_bug.cgi?id=667652
2012-01-18 10:20:53 -05:00
Owen W. Taylor
301bacec9f workspaceThumbnail: improve handling of notify::minimized signal
There were various cases where we could lose track of a window and
leave the notify::minimized signal connect after the actor was destroyed
or the workspace removed. This could result in operations on a removed
workspace and assertion failures inside Mutter.

https://bugzilla.redhat.com/show_bug.cgi?id=773059
https://bugzilla.gnome.org/show_bug.cgi?id=667652
2012-01-17 10:53:07 -05:00
Owen W. Taylor
8943b3b0e9 workspaceThumbnail: disconnect handlers when workspace is removed
We need to remove the handlers when the workspace is removed, not
when the animation of it being removed finishes, or we can access
a destroyed workspace and triggger an assertion failure in Mutter.

https://bugzilla.redhat.com/show_bug.cgi?id=705664
https://bugzilla.gnome.org/show_bug.cgi?id=667652
2012-01-17 10:53:07 -05:00
Stefano Facchini
f59018f2d7 workspaceThumbnail: clear the drop placeholder on pointer leave
We add a drag monitor to check whether the pointer is inside
the workspace selector, and update the visibility of the drop
placeholder consequently.

https://bugzilla.gnome.org/show_bug.cgi?id=664201
2012-01-17 15:45:23 +01:00
Florian Müllner
47b55e29d4 workspace-thumbnails: Emit 'window-drag-cancelled'
The dash handles 'window-drag-cancelled', to be able to do the
animations for drag snap-back and size changes in parallel. As
the signal is not emitted for previews in the workspace switcher,
it does not work in that case.
2011-12-02 17:08:39 +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
Giovanni Campagna
b1064cbe50 WorkspaceThumnail: fix typo
An if is missing, causing the subsequent expression to evaluate to
nothing, and the invocation it should be protect to be unconditional.
2011-11-21 21:59:09 +01:00
Jasper St. Pierre
703d2ead33 workspaceThumbnail: Allow users to create workspaces at any position
Allow a user to create a new workspace by dragging a window or a launcher in
the middle of two existing ones.

https://bugzilla.gnome.org/show_bug.cgi?id=646409
2011-11-07 14:36:06 -05: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
Rui Matos
82ce8fe3ff Use Meta.BackgroundActor instances instead of cloning global.background_actor
Instances of this class share a single CoglTexture behind the scenes which
allows us to show the background with different rendering options without
duplicating the texture data.

https://bugzilla.gnome.org/show_bug.cgi?id=656433
2011-08-29 19:17:01 +01:00