1
0
Fork 0
Commit graph

356 commits

Author SHA1 Message Date
Florian Müllner
06a31992e3 screen: Tweak workspace initialization (again)
Commit 8100cefd4c fixed a crash during workspace initialization by
tweaking the startup sequence; as a result, the plugin (like gnome-shell)
is now started before workspaces are fully initialized, which breaks
some reasonable assumptions (like always having an active workspace).
This is particularly problematic considering that the code making those
assumptions is not necessarily our own (extensions!), so return to
fully initialize workspaces before the compositor again.
At the same time, make sure to only call meta_workspace_activate()
once during initialization to avoid reintroducing the crash.

https://bugzilla.gnome.org/show_bug.cgi?id=732695
2014-07-10 17:50:59 +02:00
Jasper St. Pierre
09610daea1 gesture-tracker: Don't pass an autodeny-timeout
Just use the default value of 250.
2014-07-08 13:27:38 -04:00
Jasper St. Pierre
82dce6758a window: Remove pending pings in unmanage
This makes sure that we see them for Wayland clients as well, and don't
time out and crash when we're accessing an invalid window / surface.

Spotted-by: Rui Matos <tiagomatos@gmail.com>
2014-07-08 12:17:08 -04:00
Carlos Garnacho
23b074481a display: Set an X11 passive touch grab on the root window
Touch events will be caught first by the compositor this way,
whenever the MetaGestureTracker notifies of the accepted/rejected
state of a sequence, XIAllowTouchEvents() will be called on it
accordingly, so it is handled exclusively by the compositor or
punted to clients.
2014-07-08 11:21:29 -04:00
Carlos Garnacho
a9ba98686f display: Add a global MetaGestureTracker 2014-07-08 11:21:28 -04:00
Jasper St. Pierre
89cdfc9194 display: Use G_SOURCE_CONTINUE / G_SOURCE_REMOVE 2014-06-12 17:46:23 -04:00
Jasper St. Pierre
ad60ea9e0e display: Use meta_window_has_pointer instead of XQueryPointer 2014-06-12 17:46:23 -04:00
Florian Müllner
8100cefd4c screen: Split workspace initialization from meta_screen_new()
Since commit 8b2b65246a, we assume that the compositor always
exists. Alas, the assumption is wrong - the compositor is currently
initialized after the screen, but meta_screen_new() itself may
call a compositor function if initialization involves a workspace
switch (which will happen when meta_workspace_activate() is called
more than once and for different workspaces - or in other words,
when _NET_CURRENT_DESKTOP is set and not 0).
So carefully split out the offending bits and only call them after
the compositor has been initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=731332
2014-06-11 23:35:34 +02:00
Jasper St. Pierre
12fc394b92 display: Fix the logic for moving attached dialogs
If we have a tree of a window, a non-attached dialog, and then an
attached dialog, we want to move the second window, not the attached
dialog or the topmost. In other words, we want to move the first
non-attached window, or the first "freefloating window".

This happens in Firefox, whose Preferences dialog is freefloating,
but suboptions of those are modal dialogs.
2014-06-11 16:42:05 -04:00
Rico Tzschichholz
f5a4e996a8 display: Remove the screen from get_tab_list 2014-06-03 14:40:15 +02:00
Florian Müllner
d380d30ef4 Update (allow-none) annotations
The annotation has been deprecated in favor of (nullable) and/or
(optional).
2014-05-28 21:55:03 +02:00
Jasper St. Pierre
6e06648f7a window: Refactor all move/resize operations to be in frame rect space
For Wayland, we want to have everything possible in terms of the frame
rect, or "window geometry" as the Wayland protocol calls it, in order
to properly eliminate some flashing when changing states to fullscreen
or similar.

For this, we need to heavily refactor how the code is structured, and
make it so that meta_window_move_resize_internal is specified in terms
of the frame rect coordinate space, and transforming all entry points
to meta_window_move_resize_internal.

This is a big commit that's hard to tear apart. I tried to split it
as best I can, but there's still just a large amount of changes that
need to happen at once.

Expect some regressions from this. Sorry for any temporary regression
that this might cause.
2014-05-27 15:44:34 -04:00
Jasper St. Pierre
4acb902423 window: Correct the anchoring of drag moving / resizing
Now that meta_window_move_resize and friends act in frame rect
coordinates, we need to convert the initial grab_anchor_window_pos
storage to be in frame rect coordinates as well.
2014-05-27 15:44:33 -04:00
Jasper St. Pierre
4053c92abf Rework timestamp pinging
If a window temporarily goes unresponsive, and then returns later, we
should hide the kill dialog that we showed to the user.
2014-05-20 15:59:15 -04:00
Jasper St. Pierre
8640982e68 Convert window menus to a compositor implementation 2014-05-17 15:16:23 -04:00
Jasper St. Pierre
71544fbf4e display: Replace set_grab_op_cursor with update_cursor
Now that we don't have to regrab to change the cursor, since it's
simply the cursor on the root window, all we have to do is update
the cursor on the screen.
2014-05-14 09:20:49 -04:00
Jasper St. Pierre
f57b0726a0 cursor-tracker: Remove the grab cursor
We expect that meta_screen_set_cursor while grabbed will properly
set the cursor on the root window. Make sure this works by simply
always using the root cursor when we have an active grab.
2014-05-13 16:20:03 -04:00
Jasper St. Pierre
7b3cdc8f96 display: Correct check for grab_window_buttons
When we're a Wayland compositor, we get all the events, no exceptions,
so we don't need to grab.

This was masking focusing and raising issues under nested that showed
up under native.
2014-05-08 14:19:22 -04:00
Giovanni Campagna
1427d20922 MetaDisplay: free the wayland windows table at close
Like we do for the XID table.

https://bugzilla.gnome.org/show_bug.cgi?id=729732
2014-05-07 19:04:54 +02:00
Jasper St. Pierre
5d310e06ba display: Remove some more unnecessary NULL checks
Instead, replace them with another assert precondition.
2014-05-02 09:37:01 -04:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Florian Müllner
a6601e92aa display: Don't grab transient's parent unconditionally
Since commit 6e8d1d79d, move operations are always performed for
the (toplevel) parent of all transient, which is just plain silly
if the dialog is not actually attached to its parent (either because
the dialog is not modal or the setting is disabled).
2014-05-02 12:27:39 +02:00
Jasper St. Pierre
7726001d43 window: Simplify resize_popup handling 2014-04-29 17:58:22 -04:00
Jasper St. Pierre
70713cc7db window: Add some hooks for when grab ops begin / end on windows 2014-04-29 17:58:22 -04:00
Florian Müllner
d9a2443e53 Fix crash when cursor theme lookup failed
meta_cursor_reference_from_theme() may return %NULL on failure,
in which case we currently crash when trying to release it.
2014-04-29 22:20:03 +02:00
Jasper St. Pierre
1d5b4e5b2f display: Remove the same checks in end_grab_op 2014-04-28 17:34:32 -04:00
Jasper St. Pierre
6e8d1d79d1 display: Make sure to retrieve the toplevel transient for
If we have multiple modal stacked dialogs, move the top one, not
the immediate parent, which heavily confuses mutter.
2014-04-28 17:34:32 -04:00
Jasper St. Pierre
7cefe91c3c display: Fix tiling when grabbing an attached dialog
It seems we used the wrong variable by accident
2014-04-28 17:34:32 -04:00
Jasper St. Pierre
1ef6a5542a display: Remove extraneous checks for grab_window
We assert a few lines down anyway, so just move the asserts up
and kill the if statement.
2014-04-28 17:34:32 -04:00
Jasper St. Pierre
bc0f7def47 display: Clean up whitespace 2014-04-28 17:34:31 -04:00
Adel Gadllah
4e584c2cf0 display: Don't call x11 backend code when running native
https://bugzilla.gnome.org/show_bug.cgi?id=729044
2014-04-27 20:24:15 +02:00
Jasper St. Pierre
ebb6847bd1 ui: Don't use grab ops for grab negotation
Grab operations are now always taken on the backend connection, and
this breaks GTK+'s event handling.

Instead of taking a grab op, just do the handling ourselves. The
GTK+ connection will get an implicit grab, which means pointer /
keyboard events won't be sent to the rest of mutter, which is good.
2014-04-24 13:36:40 -04:00
Jasper St. Pierre
a6f3534ff0 display: Set the cursor theme on the backend display as well 2014-04-24 11:26:11 -04:00
Jasper St. Pierre
490f1a6249 display: Simplify cursor theme handling 2014-04-24 11:26:10 -04:00
Jasper St. Pierre
5b83bfb1db display: Make sure to ungrab the pointer before starting a grab op
Now that we grab devices on the X11 connection, we can run into
cross-connection issues. Since GTK+ frames are on the UI connection,
they'll get the passive grab when we click on them. Forcibly ungrab
on GTK+'s connection before attempting to take a grab on the backend
connection ourselves.
2014-04-24 11:26:10 -04:00
Jasper St. Pierre
72c65cbff0 display: Take passive grabs on the backend connection 2014-04-23 15:43:34 -04:00
Jasper St. Pierre
86368e7e07 backend: Add grab_device / ungrab_device
This makes sure that we take active grabs on the correct connection.
Passive grabs are still broken.
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
f42184ded8 display: Pull the grab cursor from the cursor tracker
This might look silly, but just wait...
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
af515732b0 display: Clean up set_grab_op_cursor 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
1762436775 display: Remove the screen from set_grab_op_cursor 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
4fd017d23d display: Always grab the root window
This grab needs to move to the backend, where we won't be able to
discriminate between different windows
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
2f6ce4783b display: Remove grab_xwindow from the public API 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
c6296aa17f cursor: Make load_cursor_on_server public 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
b501ca5a24 cursor: Remove cursor tracker from API 2014-04-23 12:15:11 -04:00
Jasper St. Pierre
20a0eb9809 Require the XSync and XShape extensions at build-time
It's been long enough. We can mandate support for these, at least
at build-time. The code doesn't actually compile without either
of these, so just consider that unsupported.
2014-04-22 14:17:09 -04:00
Jasper St. Pierre
d8dfe4e4ad display: Remove the RENDER extension requirement
Surprisingly, it's completely unused across all of the codebase.
2014-04-22 14:17:09 -04:00
Jasper St. Pierre
7c0d75e34f cursor: Don't access the cursor tracker from the screen directly
Go through the get_for_screen getter.
2014-04-22 12:44:30 -04:00
Jasper St. Pierre
cd4e6fcdee display: Remove unused grab variables 2014-04-20 13:06:41 -04:00
Jasper St. Pierre
2f9c601ae4 display: Clean up end_grab_op 2014-04-20 13:06:41 -04:00
Jasper St. Pierre
9ca0349c2b display: Use grab_op_is_moving_or_resizing 2014-04-20 13:00:51 -04:00