Commit Graph

402 Commits

Author SHA1 Message Date
a9ba98686f display: Add a global MetaGestureTracker 2014-07-08 11:21:28 -04:00
89cdfc9194 display: Use G_SOURCE_CONTINUE / G_SOURCE_REMOVE 2014-06-12 17:46:23 -04:00
ad60ea9e0e display: Use meta_window_has_pointer instead of XQueryPointer 2014-06-12 17:46:23 -04:00
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
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
f5a4e996a8 display: Remove the screen from get_tab_list 2014-06-03 14:40:15 +02:00
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
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
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
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
8640982e68 Convert window menus to a compositor implementation 2014-05-17 15:16:23 -04:00
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
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
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
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
5d310e06ba display: Remove some more unnecessary NULL checks
Instead, replace them with another assert precondition.
2014-05-02 09:37:01 -04:00
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
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
7726001d43 window: Simplify resize_popup handling 2014-04-29 17:58:22 -04:00
70713cc7db window: Add some hooks for when grab ops begin / end on windows 2014-04-29 17:58:22 -04:00
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
1d5b4e5b2f display: Remove the same checks in end_grab_op 2014-04-28 17:34:32 -04:00
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
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
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
bc0f7def47 display: Clean up whitespace 2014-04-28 17:34:31 -04:00
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
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
a6f3534ff0 display: Set the cursor theme on the backend display as well 2014-04-24 11:26:11 -04:00
490f1a6249 display: Simplify cursor theme handling 2014-04-24 11:26:10 -04:00
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
72c65cbff0 display: Take passive grabs on the backend connection 2014-04-23 15:43:34 -04:00
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
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
af515732b0 display: Clean up set_grab_op_cursor 2014-04-23 12:15:12 -04:00
1762436775 display: Remove the screen from set_grab_op_cursor 2014-04-23 12:15:12 -04:00
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
2f6ce4783b display: Remove grab_xwindow from the public API 2014-04-23 12:15:12 -04:00
c6296aa17f cursor: Make load_cursor_on_server public 2014-04-23 12:15:12 -04:00
b501ca5a24 cursor: Remove cursor tracker from API 2014-04-23 12:15:11 -04:00
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
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
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
cd4e6fcdee display: Remove unused grab variables 2014-04-20 13:06:41 -04:00
2f9c601ae4 display: Clean up end_grab_op 2014-04-20 13:06:41 -04:00
9ca0349c2b display: Use grab_op_is_moving_or_resizing 2014-04-20 13:00:51 -04:00
f9305be450 display: Don't bother checking for mouse/keyboard separately
Just use our new is_moving_or_resizing method.
2014-04-20 12:03:25 -04:00
6c9aa15814 display: Rename is_mouse_only to is_mouse 2014-04-20 12:03:24 -04:00
d09116ebce display: Rename meta_grab_op_is_mouse to is_moving_or_resizing
is_mouse actually checks for all combinations of moving/resizing
grab ops, which is quite confusing. Just rename it.
2014-04-20 12:03:24 -04:00
beca90a689 display: Expose meta_grab_op_is_mouse_only
And use it properly in some event handling code.
2014-04-20 12:03:24 -04:00