Commit Graph

27 Commits

Author SHA1 Message Date
Dan Winship
2782011ce8 shell-global: try to resync the pointer state after grabs
If the pointer moves on or off the stage while another process has a
grab, we will lose track of it. One example of this is that if you use
a popup menu from a message tray trayicon, the tray will stay up after
the menu goes away, because the shell never saw the pointer leave it.

Add a new method shell_global_sync_pointer() that causes clutter to
recheck what actor is under the pointer and generate leave/enter
events if appropriate.

Of course, we can't actually tell for sure when another process has a
grab, so we need a heuristic of when to call this. Currently we call
it from Chrome._windowsRestacked(), which is not really the right
thing at all, but does fix the menu-from-trayicon case...

https://bugzilla.gnome.org/show_bug.cgi?id=630842
2011-03-21 14:56:53 -04:00
Alexander Larsson
079953c3ee Switch to using the mutter primary monitor APIs
https://bugzilla.gnome.org/show_bug.cgi?id=609258
2011-03-16 20:30:58 +01:00
Alexander Larsson
d964d2baae Ensure that all struts we set extends to their boundary
Mutter really expects this, as this is how app-specified struts
happen. For instance, if the primary display is beside a taller
screen and is not positioned at the top, then we extend the struts
for the panel with the size of the unused area above the primary
monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-03-03 15:56:16 +01:00
Alexander Larsson
d235c205d6 Consider struts top/botton or left/right based on primary monitor size
Right now we require a strut to be as wide as the full screen to
create a TOP strut. This means that in a multi-monitor scenario (at
least if the primary monitor is leftmost) we will make the panel strut
be Meta.Side.LEFT due to the random side picking for corner objects.

This changes the width/height comparison to the primary monitor rather
than the screen to get this right. Also adds some docs about how
struts work in a multi-monitor situation.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-03-03 15:56:16 +01:00
Alexander Larsson
885f668d53 Track fullscreen status per-monitor in Chrome
This is required since we can have chrome on multiple monitors (due to
per-monitor hot-corners).

Windows are primary associated with the monitor that their center is on.

https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 20:16:48 +01:00
Alexander Larsson
60ae784c01 Remove unused tracking of visibility in Chrome
https://bugzilla.gnome.org/show_bug.cgi?id=642881
2011-02-23 15:24:28 +01: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
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
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Dan Winship
a4befeba53 De-duplicate "actor contains actor" code
Add _st_actor_contains() in st-private for use within St, and
monkey-patch in a Clutter.Actor.contains() for use by javascript, and
then replace all the duplicate implementations with one or the other
of those.

https://bugzilla.gnome.org/show_bug.cgi?id=621197
2010-06-11 10:05:46 -04:00
Adel Gadllah
77fcf68ea3 [chrome] Ignore fullscreen flag when in overview
Ignore the fullscreen flag when we are in the overview,
otherwise we might up not showing actors like the panel even though
they have visibleInOverview set to true.

https://bugzilla.gnome.org/show_bug.cgi?id=619693
2010-05-26 22:14:00 +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
Joseph Scheuhammer
62afd2ffa3 Reorganize stage in terms of a UI Group actor and everything else
In preparation for adding magnification, "uiGroup.patch", organizes the stage
along the following lines:

Stage
  *Magnifier
  UI group
    Window group
    Chrome group
    Overlay group
    Alt tab
    App display
    Chrome
    ...

This allows a magnifier actor to clone and magnify the UI group.  The magnifier
is a sibling of the UI Group in this stage oraganization -- see the next patch,
"Magnifier.patch".
2010-05-06 17:18:10 -04:00
Dan Winship
dd0882aa8b [Chrome] add "visibleInFullscreen" property
Chrome elements with this flag set will be visible even when a
fullscreen window is present.

https://bugzilla.gnome.org/show_bug.cgi?id=608667
2010-05-03 12:51:31 -04:00
Dan Winship
31914ab23b [Chrome] redo using ShellGenericContainer
Previously we used a ClutterGroup containing a second ClutterGroup for
the non-visibleInOverview actors. Redo it using a single
ShellGenericContainer, and use set_skip_paint() to hide the
non-overview chrome when the overview is visible.

Also fix up the default values for trackActor().

https://bugzilla.gnome.org/show_bug.cgi?id=608667
2010-05-03 12:51:22 -04:00
Adel Gadllah
ab75c8cacc [chrome] Fix fullscreen check for broken apps
Document fullscreen checks and add a third case to catch apps like
flash who position there windows sightly offscreen to hide there decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=614509
2010-04-06 21:14:54 +02:00
Adel Gadllah
f262473a3f Fix fullscreen behaviour
The check in _windowsRestacked checks for
windows[i].x >= primary.x
and
windows[i].x <= primary.x + primary.width
(likewise for y).

This is wrong because a fullscreen window on the secondary screen is likely
to have windows[i].x == primary.x + primary.width which means that the checks
for _both_ screens would be valid, but the first one would win due to
the "break;" statement.

But here the window isn't really on the primary but on the secondary one.

Fix that by using < instead of <= for those checks.

https://bugzilla.gnome.org/show_bug.cgi?id=614509
2010-04-01 16:53:21 +02:00
Adel Gadllah
2d574047e4 Don't show chrome when a fullscreen window is open
Currently the check in chrome.js checks if a window is on the
primary screen by checking its coordinates, width and height.

This check misses the case where windows just set
_NET_WM_FULLSCREEN without changing their position and
size (examples are Flash and ooimpress's presentation window).

Fix this by separating the check for fullscreen windows from the
override redirect one, and only check whether the window is
anywhere on the primary screen in the fullscreen case.

https://bugzilla.gnome.org/show_bug.cgi?id=597271
2010-02-09 21:35:45 +01:00
Florian Scandella
7b0526dc5c [chrome] only hide chrome if fullscreen window is on the same monitor
https://bugzilla.gnome.org/show_bug.cgi?id=599926
2009-12-01 12:26:41 -05:00
Dan Winship
b0cb8fb85a [Chrome] clean up APIs and remove workarounds
https://bugzilla.gnome.org/show_bug.cgi?id=597044
2009-11-23 13:49:18 -05:00
Dan Winship
d0d79c5b3e Make "global" global.
Rather than doing "let global = Shell.Global.get()" everywhere we
need it, just create a global variable called "global".

http://bugzilla.gnome.org/show_bug.cgi?id=594546
2009-09-08 16:21:15 -04:00
Sander Dijkhuis
47af454115 Bug 591437 - Rename overlay.js to overview.js
Replace 'overlay' with the more descriptive name 'overview'
where the Activities Overview is meant. Call it Overview
(capitalized) in code comments.

The overlay-group and overlay-key provided by Mutter are not
affected, since they may be used for other components than
the Activities Overview.
2009-08-11 15:15:25 +02:00
Dan Winship
5a0d8eca9f Fix Chrome.removeActor()
The split between this.actor and this.nonOverlayActor in chrome.js is
annoying, but aside from actually subclassing ClutterGroup (which
would have to be done from C), all of the other possibilities are
annoying too.
2009-07-06 11:55:17 -04:00
Owen W. Taylor
14bb73220b Increase priority of region-updating idle
Increase the priority of the idle for updating work area and struts
to META_PRIORITY_BEFORE_REDRAW. This prevents it from being starved
by a constantly-redrawing client.

http://bugzilla.gnome.org/show_bug.cgi?id=585500
2009-06-29 15:11:51 -04:00
Owen W. Taylor
2c7d33bad2 Port gnome-shell to the Clutter-1.0 API
- clutter_actor_get_transformed_position()/size() return floats
- clutter_stage_get_actor_at_pos() takes a pick mode
- ClutterTimeline no longer has a concept of frames
- ClutterUnit is now replaced by float
- cogl_texture_new_from_data() signature changed

http://bugzilla.gnome.org/show_bug.cgi?id=585013
2009-06-08 13:49:53 -04:00
Owen W. Taylor
0c7b983b10 Fix Chrome group not to interfere with drag-and-drop
Drag and drop was not working since the (non-reactive, invisible)
chrome group was on top of most of the screen. Explicitly set
a 0x0 size on that group to resolve the problem.
2009-05-23 10:47:13 -04:00
Dan Winship
bc558306a4 Improve the framework for managing shell UI
Adds an explicit "chrome" layer for the panel (and later the sidebar),
managing the input region and struts for them, and hiding them when
fullscreen windows are present or the user enters the overlay.

http://bugzilla.gnome.org/show_bug.cgi?id=581771
2009-05-15 16:12:53 -04:00