Commit Graph

274 Commits

Author SHA1 Message Date
Florian Müllner
1e13f32cea style: Disable camelcase rule for GObject properties
For GObject properties, we follow the convention of all-lowercase,
dash-separated names. Those translate to underscores in getters/setters,
so exempt them from the newly added "camelcase" rule.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
2019-07-24 00:28:45 +02:00
Florian Müllner
e357559582 cleanup: Mark globals used from other modules as exported
eslint cannot figure out that those symbols are used from other modules
via imports, so they trigger unused-variable errors. To fix, explicitly
mark those symbols as exported.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
2019-07-24 00:28:45 +02:00
Florian Müllner
71759a0769 cleanup: Mark unused (but useful) variables as ignored
While we aren't using those destructured variables, they are still useful
to document the meaning of those elements. We don't want eslint to keep
warning about them though, so mark them accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
2019-07-24 00:28:45 +02:00
Florian Müllner
2f97a1a55d cleanup: Mark unused arguments as unused
This will stop eslint from warning about them, while keeping their
self-documenting benefit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
2019-07-24 00:28:45 +02:00
Florian Müllner
404bc34089 cleanup: Use default parameters where appropriate
Since ES6 it is possible to set an explicit default value for optional
parameters (overriding the implicit value of 'undefined'). Use them
for a nice small cleanup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626
2019-07-12 18:54:49 +00:00
Florian Müllner
74feb110b5 layout: Fix off-by-one indent
This sneaked into commit dbb71f0d :-(
2019-07-11 03:02:20 +02:00
Florian Müllner
dbb71f0dfc layout: Make the hot corner optional
Whether people love or hate the hot corner depends in large extents
on hardware sensitivity and habits, which is hard to get right
universally. So bite the bullet and support an option to enable or
disable hot corners ...

https://bugzilla.gnome.org/show_bug.cgi?id=688320
2019-07-10 17:29:24 +02:00
Florian Müllner
6f8dd065a4 cleanup: Use consistent style for GObject property definitions
Go with the style preferred by gjs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/608
2019-07-02 12:17:46 +00:00
Florian Müllner
4c5206954a style: Use camelCase for variable names
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
7ac35c644e style: Fix stray/missing spaces
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Jonas Dreßler
00f9b7bf69 layout: Use addChrome instead of addTopChrome for screenShieldGroup
Make sure the panel is visible above the login and screen shield actors
by adding the screenShieldGroup to the uiGroup underneath the panelBox.

This fixes a regression introduced with 2bd80579ed

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1330

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/571
2019-06-21 20:57:23 +00:00
Olivier Fourdan
ee3f52c097 layout: Use the ripples for overview
As we moved the ripples implementation different class of its own, use
that for switching to overview.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/981
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/413
https://gitlab.gnome.org/GNOME/mutter/merge_requests/453
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/merge_requests/19
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/86
2019-06-05 08:15:10 +00:00
Carlos Garnacho
771b1a0788 shell: Do not set XFixes input region on wayland compositors
This is just needed on the X11 compositor, wayland compositors are known
for handling their own input.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Jonas Dreßler
2bd80579ed layout: Show important actors above top_window_group
The top_window_group is used for windows like popup menus, which should
appear above shell chrome like the panel.

Since we want important actors such as the screen keyboard or modal
dialogs to be shown above those windows, add their actors after adding
global.top_window_group to this.uiGroup and provide a new function
addTopChrome() to add important chrome above the top_window_group.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/917

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/358
2019-05-15 22:39:53 +00:00
Marco Trevisan (Treviño)
746875258d layout: Use an invisible but mapped actor as dummy cursor
Since this could be used as boxpointer source, it should be marked as mapped,
or it will be ignored.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/435
2019-04-11 19:38:17 +00:00
Florian Müllner
6b924c00c5 layout: Use custom actor for uiGroup
The bind constraint that replaced the Shell.GenericContainer in commit
f4682748fa is subtly different from the previous code:
It forces the actor to have the same size as the stage, rather than just
requesting that size.

This breaks the magnifier which relies on the UI being able to be bigger
than the display size. Fix by going back to using a custom actor.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/646
2019-03-12 00:39:40 +00:00
Marco Trevisan (Treviño)
deead2af97 layout: Add scale property to Monitor
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2019-03-01 17:12:53 +00:00
Florian Müllner
fd50b9a45e cleanup: Use destructuring for imports from GI
This is *much* nicer than repetitive "imports.gi" lines ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/399
2019-02-09 07:39:20 +01:00
Florian Müllner
e68dfed1f7 cleanup: Port GObject classes to JS6 classes
GJS added API for defining GObject classes with ES6 class syntax
last cycle, use it to port the remaining Lang.Class classes to
the new syntax.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
2019-01-25 14:02:44 +00:00
Florian Müllner
bacfdbbb03 cleanup: Port non-GObject classes to JS6 classes
ES6 finally adds standard class syntax to the language, so we can
replace our custom Lang.Class framework with the new syntax. Any
classes that inherit from GObject will need special treatment,
so limit the port to regular javascript classes for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
2019-01-25 14:02:44 +00:00
Pascal Nowack
2159d6886f layout: Always allow hiding the overview
When a fullscreen application is focused,
toggling the overview via hot-corner is disabled,
even when the overview is currently visible.
This only makes sense, when the overview is
hidden to not to disturb the behaviour of the
fullscreen application, but leaves an
inconsistency when the overview is visible since
it should work there like when a non-fullscreen-
application is focused.

So, always allow hiding the overview using the
hot corner when the overview is visible.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/429
2019-01-09 15:47:38 +00:00
Georges Basile Stavracas Neto
dd225713a1
layoutManager: Subclass GObject.Object
LayoutManager is currently a pure JavaScript class that
relies on the rudimentary Signals.addSignalMethods() to
handle signals. This is an inefficient implementation of
one of the most central classes in GNOME Shell.

In addition to removing Shell.GenericContainer, then,
turn LayoutManager into a proper GObject.Object subclass.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153
2018-10-08 22:42:26 -03:00
Georges Basile Stavracas Neto
f4682748fa
layoutManager: Stop using Shell.GenericContainer
This one was remarkably easy to port. In order to make it,
replace the Shell.GenericContainer handlers by a constraint
and simply replace it by a St.Widget.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153
2018-10-08 22:42:26 -03:00
Florian Müllner
586a9ff9cd layout: Don't update input region on wayland
We already see all events on wayland, so we can save us the work
of computing the XFixes region there.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/273
2018-10-08 16:03:53 +00:00
Carlos Garnacho
73d8c82640 layout: Mark chrome container as NO_LAYOUT
Showing and hiding children does not affect the allocation of the uiGroup
nor its other children. We can avoid full relayout/redraw in those
situations.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/197
2018-08-14 19:13:30 +02:00
Jonas Ådahl
47ea10b7c9 Remove usage of MetaScreen
Remove any usage of MetaScreen, as it has been removed from libmutter
in the API version 3. The corresponding functionality has been moved
into three different places: MetaDisplay, MetaX11Display (for X11
specific functionality) and MetaWorkspaceManager.

https://bugzilla.gnome.org/show_bug.cgi?id=759538
2018-07-06 19:56:19 +02:00
Marco Trevisan (Treviño)
996dd74157 layoutManager: Return null monitor if focusIndex is invalid
https://bugzilla.gnome.org/show_bug.cgi?id=788882
2018-06-28 17:05:30 +02:00
Florian Müllner
3b1330880f cleanup: Use Function.prototype.bind()
When not using arrow notation with anonymous functions, we use Lang.bind()
to bind `this` to named callbacks. However since ES5, this functionality
is already provided by Function.prototype.bind() - in fact, Lang.bind()
itself uses it when no extra arguments are specified. Just use the built-in
function directly where possible, and use arrow notation in the few places
where we pass additional arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:02 +00:00
Florian Müllner
213e38c2ef cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:00 +00:00
Florian Müllner
76f09b1e49 cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace
it for better readability and to prepare for an eventual port to
ES6 classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:54:58 +00:00
Jonas Ådahl
db43c45b12 layout: Unset primary and bottom monitor when headless
We were handling being initially headless by only setting the primary
and bottom monitor if there was any primary monitor, then checking the
primary monitor reference before making calls assuming there was any
monitors.

What we didn't do was unset the primary and bottom monitor when going
headless, meaning that temporarly disconnecting a monitor while having
windows open caused an assert to be triggered due to various code paths
taking the path assuming there are valid monitors.

Unsetting both the primary and bottom monitor when going headless avoids
the code paths in the same way as they were avoided when starting
headless.

https://bugzilla.gnome.org/show_bug.cgi?id=788607
2017-10-06 20:31:14 -04:00
Jonas Ådahl
5c37facc08 ui: Improve handling being headless
Don't assume there will always be a primary (logical) monitor, or any
(logical) monitor at all. This includes not allocating / layouting /
styling correctly when being headless.

The initial background loading will also be delayed until there are any
(logical) monitors connected.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
2017-10-04 11:50:21 -04:00
Ray Strode
3b81465d32 layout: actually hide keyboard when hiding keyboard
Right now we just tuck it off screen, which may leak onto another
screen.  This commit actually hides it.

https://bugzilla.gnome.org/show_bug.cgi?id=786332
2017-08-22 09:44:15 -04:00
Florian Müllner
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Carlos Garnacho
74bd009c86 layout: Allow adding already parented actors for chrome tracking
let trackChrome accept actors that are not children of chrome actors.
this will be useful for the MetaCloseDialog in gnome-shell, which
is already included in the MetaWindowGroup, but needs to be tracked
as chrome for the dialog to receive pointer events on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 18:08:15 +02:00
Florian Müllner
4e57b45142 layout: Skip strut computation in the no-monitor case
It's possible for updateRegions() to be called before monitors have
been properly initialized. Instead of throwing an error in that case,
just skip the strut computation (that doesn't make sense anyway without
a monitor).

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
Florian Müllner
1ba014d9db layout: Range-check index before array lookup
findMonitorForActor() may be called before the layoutManager gets
to initialize monitors, so make sure the monitor index is in range
to avoid a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
Florian Müllner
99b5e10acf overview: Move ::scroll-event signal handling (again)
Commit c39ffa111 moved the signal handling from the controls- to the
background-group to enable scrolling on non-primary monitors.
However this broke scrolling on reactive overview elements as the
workspace switcher, as they're not descendants of the background.
To fix, move scroll-event handling to the overview group itself,
which is the common ancestor of all overview elements.

https://bugzilla.gnome.org/show_bug.cgi?id=768316
2016-07-05 17:47:44 +02:00
Owen W. Taylor
61fb62f969 Restart: fix maximized windows flickering to the wrong struts
When we restart, we need to update the struts for the screen before
we enter the main loop, or maximized windows will get resized to the
size of the screen without struts, then resized back.

A workaround is needed for a Clutter bug that occurs when we get
the size of an actor before the first paint of the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=761566
2016-06-30 14:17:19 -04:00
Florian Müllner
dc4b8c876e layout: Set initial visibility of fullscreen-tracking chrome
When chrome is added with the trackFullscreen parameter, the actor's
visibility will be updated automatically whenever its monitor's
fullscreen state changes. However as we currently ignore the fullscreen
state at the time the chrome is added, the initial visibility may well
be incorrect - fix this by updating the initial visibility as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=749383
2015-05-21 13:58:49 +02:00
Jasper St. Pierre
8a8abf12f9 layout: Track which barriers have been hit
For barriers like the hot corner which are made up of multiple axis
barriers, make sure that all the barriers have been left before
resetting the barrier.
2015-04-28 17:49:52 -07:00
Rui Matos
c3bf4a325d Refresh all background instances after suspend if needed
NVIDIA drivers don't preserve FBO contents across suspend / resume
cycles which results in broken backgrounds. We can work around that by
forcing a refresh when coming out of suspend.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2015-03-24 11:45:04 +01:00
Florian Müllner
b3a96f2f6c messageTray: Take over trayBox from LayoutManager
Since commit e189a34, the trayBox uses a Contraint to cover the primary
monitor's work area. This allows banners to be clipped so they don't
leak into monitors above the primary one during animations. However even
without being reactive, the trayBox now interferes with operations like
Looking Glass' object picker and overview DND.
With the trayBox no longer being positioned manually, there's no strong
reason to keep it in LayoutManager, and handling it in MessageTray allows
to hide the actor while no banner is showing, which helps with the issue
outlined above.

https://bugzilla.gnome.org/show_bug.cgi?id=744912
2015-02-27 14:16:30 +01:00
Florian Müllner
86c6716786 layout: Remove left-over property 2015-02-27 04:03:44 +01:00
Florian Müllner
f6c84d6185 layout: Don't offset trayBox when panel is hidden
The panel is not visible when in fullscreen, but critical notifications
may still be shown - having them pop out from where the panel would be
looks unpolished, so adjust the trayBox accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:41:34 +01:00
Florian Müllner
e189a34fc0 messageTray: Move notification banners to the top
The new design has banners appear from underneath the panel, so move
them to the top and clip them to the work area.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:41:29 +01:00
Florian Müllner
aedc2428be layout: Add back affectsInputRegion
It was removed as actors that should not affect the input
region can simply be added to the uiGroup instead. However
the property is useful to add non-reactive chrome, but then
use trackChrome() to add a child to the input region.

This reverts commit e62d22a50e.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:40:48 +01:00
Florian Müllner
faf00036e2 layout: Add MonitorConstraint:work-area property
Occasionally it makes sense to constrain to a monitor's work-area
rather than the entire monitor, so implement that behavior and add
a property to turn it on.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:40:48 +01:00
Florian Müllner
830b4559c0 messageTray: Remove the bottom tray
It no longer does anything useful by now, so kill it off.
Even more complexity gone, yay!

https://bugzilla.gnome.org/show_bug.cgi?id=744850
2015-02-20 17:40:44 +01:00
Sylvain Pasche
c2f5813463 layout: Compute strut side more precisely for non primary monitors
Don't assume struts are on the primary monitor while computing
the strut side. Instead, find the first monitor that overlaps the
strut and compute the strut side using it.

https://bugzilla.gnome.org/show_bug.cgi?id=744183
2015-02-20 13:59:39 +01:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Owen W. Taylor
2f5a226bc2 Fix handling of SystemBackground
Since the background rework, SystemBackground is no longer a transparent
actor that you have to stack on top of a solid background, it is an
opaque actor. Fix the color of the background actor, and remove places
where we were setting the background color underneath the system background
and expecting blending - in particular, we can always set no_clear_hint
on the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=738652
2014-10-16 17:16:06 -04:00
Rui Matos
01eb79a3cc layout: Reset the OSK to the primary monitor when monitors change
When monitors change, the previous index might not mean the same
physical monitor anymore, in fact, it might become invalid. In the
latter case, we'll actually get a JS error when accessing
this.keyboardMonitor in _updateKeyboardBox() . To avoid this, let's
just always reset the OSK to the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=738536
2014-10-16 16:42:36 +02:00
Jasper St. Pierre
83f0f4ea36 layout: Add the feedback group to the uiGroup
This makes DND under Wayland visible under the magnifier.
2014-10-06 17:08:20 -07:00
Jasper St. Pierre
0ca2fee54f layout: Don't update the input region while we have a modal
If we have a modal, the stage's input region doesn't really matter --
all events go to us anyway. To avoid doing extra work doing animations
when we have a modal, like menus, the overview, and the message tray,
just fizzle out all updates.

To make sure we catch updates, update the input region whenever we end a
modal.

https://bugzilla.gnome.org/show_bug.cgi?id=737001
2014-09-30 00:23:48 -06:00
Owen W. Taylor
650dea017b Adapt to Mutter background changes
The rewrite of Mutter's background code (see bug 735637) requires
corresponding changes here - we no longer need to layer multiple
MetaBackgroundActors together.

The general strategy is that a BackgroundSource object is created
per GSettings schema, and keeps either one Background/MetaBackground pair,
or, for animation, a Background/Metabackground pair for each monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=735638
2014-09-03 13:45:01 -04:00
Cosimo Cecchi
6687b9b739 layout: re-allocate keyboard box when monitor config changes
For example, because we are changing orientation.

https://bugzilla.gnome.org/show_bug.cgi?id=733790
2014-07-26 17:45:55 +02:00
Owen W. Taylor
b6f3e15037 Add support for meta_restart() and MetaDisplay::restart
Support was added to Mutter to allow it to trigger a restart
to allow for restarts when switching in or out of stereo mode.

Hook up to the new signals on MetaDisplay to show the restart
message and reexec. Meta.is_restart() is used to suppress
the startup animation.

This also allows us to do 'Alt-F2 r' restarts more cleanly
without a visual flash and animation.

https://bugzilla.gnome.org/show_bug.cgi?id=733026
2014-07-16 18:04:19 -04:00
Jasper St. Pierre
41a3f10938 layout: Make the dummy cursor invisible
This means that moving it around won't attempt to cause a full redraw of
the stage. Yikes.
2014-06-27 11:59:10 -04:00
Jasper St. Pierre
ec288d0e68 layout: Use ClutterActor.background-color instead of ClutterStage.color
The latter is deprecated.
2014-06-27 10:54:10 -04:00
Florian Müllner
585930123d layout: Do not expand struts to screen edges
set_builtin_struts() in mutter now handles this for us, so we can kill
off the extra code here.

https://bugzilla.gnome.org/show_bug.cgi?id=730527
2014-06-12 15:36:40 +02:00
Florian Müllner
525c8780fd Fix typo 2014-04-15 23:35:06 +02:00
Florian Müllner
76c4ec8ee4 layout: Don't always extend struts to the screen edge
NetWM struts are defined in terms of screen edges (rather than monitor
edges), which works poorly with vertical monitor layouts (as it renders
entire monitors unusable). Don't extend struts in those cases.

https://bugzilla.gnome.org/show_bug.cgi?id=663690
2014-04-15 23:35:06 +02:00
Rui Matos
e2ccbe5528 layout: Change setDummyCursorPosition to also set the size
If we are being used to follow a text entry cursor we also need to set
the size so that the popup menu avoids covering it.

https://bugzilla.gnome.org/show_bug.cgi?id=727579
2014-04-11 16:54:01 +02:00
Bastien Nocera
cd2bd7685a js: Name all the timeouts and idles
With very uninventive names. Names now, good names later.

https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 21:08:16 +02:00
Rui Matos
2974b29f15 layout: Create a group for modal dialogs
This way we can ensure that they're always stacked under the OSK.

https://bugzilla.gnome.org/show_bug.cgi?id=719451
2014-03-18 17:03:39 +01:00
Daniel Drake
29485ff24b layout: really queue region update before redraw
This code may have worked when written in 2009, but later gjs commit
b5e467d89aea43a8e32a1138d232c8a32e6b0785 removed the priority
parameter from idle_add.

Now, when running a constantly-updating client (es2gears) on an
embedded platform, _updateRegions() does not get called and I see
unresponsive window decorations.

Update the code to use meta_later_add() like other parts of the
shell, which is actually slightly better in this case anyway.
Solves the unresponsiveness problem.

https://bugzilla.gnome.org/show_bug.cgi?id=585500
2014-03-14 06:16:42 -06:00
Adel Gadllah
87abbf9b20 hdpi: Revert hacks
Revert the hacks that where added in response to a bug caused by
commit ba459f4d20

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-18 23:40:34 +01:00
Adel Gadllah
a012ca4fac layout: Don't query the monitor size twice 2014-02-17 13:42:20 +01:00
Adel Gadllah
3ba49b0a50 layout: Protect against broken monitor size reports
VNC / XRDP reports nonsensial (i.e 0) monitor dimensions causing us to
end up with a dpi of "Infinity" and thus scale even though we shouldn't.

https://bugzilla.redhat.com/show_bug.cgi?id=1065788
2014-02-17 13:38:55 +01:00
Adel Gadllah
0f3c129b95 layout: Set high dpi scaling factor
Set the scaling factor when the dpi is above the hidpi threshold.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-12 22:53:37 +01:00
Colin Walters
32110a9866 layout: Remove stray reference to parentSetId
This was removed in a4dea25d76.
2014-02-12 14:13:08 -05:00
Giovanni Campagna
477f28a6bd LayoutManager: untrack actors that are destroyed
If an actor is destroyed, calling get_transformed_size()/position()
can return bogus values and trigger JS exceptions.
This can happen if a tracked actor comes from an extension
(such as classic mode's window-list) and that extension is
deactivated.

https://bugzilla.gnome.org/show_bug.cgi?id=723661
2014-02-09 19:30:02 +01:00
Jasper St. Pierre
c8a58dcb69 layout: Add a standard dummy cursor
Right now we have three "dummy cursor" widgets between the background
menu, the message tray menu, and the IBus candidate popup. Consolidate
these into one "dummy cursor" widget which is tracked in the layout
manager.
2014-01-14 18:56:45 -05:00
Jasper St. Pierre
a4dea25d76 layout: Don't require fullscreen-tracked actors to be toplevel
I don't know why this was ever here; We only have one
fullscreen-tracked actor.
2014-01-14 18:56:45 -05: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
216d84faeb layout: Adjust the opening animation to be less intense
https://bugzilla.gnome.org/show_bug.cgi?id=712362
2013-11-19 22:09:34 -05:00
Jasper St. Pierre
831bd07b0d layout: Fix several issues with the background management code
If monitor-changed fires at startup, it will destroy all of the
backgrounds, but since this._isStartup is true, won't recreate any
of them. Additionally, since _bgManagers is indexed by monitor index,
if the primary index is not 0, it could become a sparse array (e.g.
[undefined, undefined, primaryBackground]), and our for loop will
crash trying to access properties of undefined.

Fix both of these issues by always creating background managers for
every monitor, hiding them on startup but only showing them after
the startup animation is complete.

One thing we need to watch out for is that while LayoutManager is
constructing, Main.uiGroup / Main.layoutManager will be undefined,
so addBackgroundMenu will fail. Fix this by passing down the uiGroup
to the background menu code.

https://bugzilla.gnome.org/show_bug.cgi?id=709313
2013-11-14 14:28:51 -05:00
Adel Gadllah
f6010864ea layout: Flush region update in showOverview
We cannot wait for the queued update region to fire when
xdnd is being used because a wrong input shape can result
into a xdnd leave event when the user moves the pointer fast.

https://bugzilla.gnome.org/show_bug.cgi?id=708887
2013-10-11 20:16:44 +02:00
Adel Gadllah
15ab285174 layout: Use monitor index when adding bg managers
Don't assume that this._bgManagers.push() (i.e adding to the end) is always
correct.

On startup we call _createPrimaryBackground which passes in the primary index
which may not be 0.
2013-10-02 15:58:22 +02:00
Jasper St. Pierre
7234aa601f layout: Remove some outdated set_hidden_from_pick calls
XDND no longer uses CLUTTER_PICK_ALL, so we don't need to hide
certain actors from pick anymore.
2013-08-21 16:53:04 -04:00
Jasper St. Pierre
a8a2b7d7bb layout: Create the primary background in a not critical location
The startup animation should be as minimal as possible to prevent
hangups.
2013-08-21 16:53:04 -04:00
Jasper St. Pierre
3582ba0c77 layout: Don't use the input mode to block events to windows
Instead, use the standard Clutter scene graph and our Chrome system.

This also removes our last use of the input mode, so remove that as
well.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:17 -04:00
Jasper St. Pierre
93dc7a51c0 Rework window / actor focus handling
The duality of the Clutter's key focus and mutter's window focus has long been
a problem for us in lots of case, and caused us to create large and complicated
hacks to get around the issue, including GrabHelper's focus grab model.

Instead of doing this, tie basic focus management into the core of gnome-shell,
instead of requiring complex "application-level" management to get it done
right.

Do this by making sure that only one of an actor or window can be focused at
the same time, and apply the appropriate logic to drop one or the other,
reactively.

Modals are considered a special case, as we grab all keyboard events, but at
the X level, the client window still has focus. Make sure to not do any input
synchronization when we have a modal.

At the same time, remove the FOCUSED input mode, as it's no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:16 -04:00
Florian Müllner
9786b2d096 layout: Keep the top_window group above newly added chrome
The top_window_group was introduced for popup windows that should
appear above system chrome, but as the group itself is just a child
of Main.uiGroup, chrome that is added after top_window_group will
still be stacked on top.
At least correct the stacking for actors added via addChrome().

https://bugzilla.gnome.org/show_bug.cgi?id=702338
2013-06-26 13:37:58 +02:00
Jasper St. Pierre
4b7e230531 layout: Properly order startup initialization
In order to make sure that the struts and regions are initialized,
we need to make sure that we do with the conditions that nothing
is transformed, like the uiGroup, and that everything is visible.

These invariants broke during a fix to hide the UI until the
system background texture could be loaded. Now, reorder things so
that the system background is loaded, and then the UI is properly
loaded, and so on.

https://bugzilla.gnome.org/show_bug.cgi?id=696159
2013-05-22 12:53:39 -04:00
Jasper St. Pierre
aefe0d3ddd layout: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=696159
2013-05-22 12:53:39 -04:00
Giovanni Campagna
976166a04a Finish removing the overlay_group concept
In preparation for removing from mutter too.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 18:34:05 +02:00
Giovanni Campagna
f0113c5ff5 Overview: use a normal chrome actor to handle events during XDND
Instead of using the input mode, when the overview is not modal
it should use a Chrome-tracked actor, that is added to the input
region. Because the overview always takes pointer input when
visible, the actor is added at startup, and it is shown and hidden
as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 18:27:27 +02:00
Jasper St. Pierre
e62d22a50e layout: Remove affectsInputRegion
This can easy be worked around by adding things to the uiGroup
instead, so there's really no reason to have it here still.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 12:11:19 -04:00
Jasper St. Pierre
402f2d939c layout: Remove use of skip_paint
We no longer use this on the uiGroup.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 12:11:19 -04:00
Giovanni Campagna
d0310bd745 Overview: don't use the overlay_group
It's a deprecated concept, and we want to have our own actor
that we can add to the chrome to handle the input region.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-21 22:24:53 +02:00
Giovanni Campagna
db2e6e5b95 keyboard: don't raise to the top when showing
The stacking is already correct due to the grouping, and calling
raise_top() results in the keyboard above the OSDs.

https://bugzilla.gnome.org/show_bug.cgi?id=700620
2013-05-20 22:00:36 +02:00
Jasper St. Pierre
db89648f62 Remove simple uses of ClutterRectangle
https://bugzilla.gnome.org/show_bug.cgi?id=699975
2013-05-09 09:49:12 -04:00
Owen W. Taylor
9ae2440ec1 Remove LayoutManager::fullscreen-changed
Since we now have global.screen::in-fullscreen-changed, remove the
duplicate signal. To prevent ordering problems in connecting to
this signal, make inFullscreen a property-function of a new Monitor
object rather than a data property we tack on to a Rectangle object.

https://bugzilla.gnome.org/show_bug.cgi?id=649748
2013-04-29 11:17:29 -04:00
Jasper St. Pierre
09aa59f98b layout: Correct hot corner barriers in RTL layouts
https://bugzilla.gnome.org/show_bug.cgi?id=698884
2013-04-26 11:23:37 -04:00
Jasper St. Pierre
64ecfa49eb layout: Ensure that the hotCorners array is always indexable by monitor number
messageTray relies on indexing the hot corners array by monitor number,
so we should make this a guarantee.

https://bugzilla.gnome.org/show_bug.cgi?id=698513
2013-04-23 19:14:01 -04:00
Jasper St. Pierre
d61fe357f6 layout: Clip the window group when doing the startup animation
This ensures that when we have windows that are already visible,
like desktop icons, they don't fly across the screen from what
seems to be hyperspace to get into view.

https://bugzilla.gnome.org/show_bug.cgi?id=696323
2013-03-27 16:30:00 -04:00