1
0
Fork 0
Commit graph

328 commits

Author SHA1 Message Date
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
Jasper St. Pierre
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
Jasper St. Pierre
6c9aa15814 display: Rename is_mouse_only to is_mouse 2014-04-20 12:03:24 -04:00
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
e55dd4e3f4 display: Rename META_GRAB_OP_WAYLAND_CLIENT to WAYLAND_POPUP
We're going to introduce other grab ops soon.
2014-04-20 12:03:24 -04:00
Jasper St. Pierre
258112d6a7 display: Remove COMPOSITOR from mouse/keyboard grab ops
Looking at the code paths where is_mouse / is_keyboard are used,
all of them should never be run when dealing with a COMPOSITOR
grab op, since they're filtered out above or the method is just
never run during that time.

It's confusing that COMPOSITOR is in here, and requires us to
be funny with other places in code, so just take it out.
2014-04-20 12:03:24 -04:00
Jasper St. Pierre
92340fd8da display: Kill #if 0'd support for _NET_RESTACK_WINDOW requests
The code has been dead and broken for a long, long time now.
2014-04-18 10:12:11 -04:00
Jasper St. Pierre
a8d2dfd14f seat: Don't require an event to repick()
We always pass NULL, and anywhere where we want to pass an event
should be handled internally.
2014-04-17 19:15:53 -04:00
Jasper St. Pierre
bb62f49c98 display: Wayland client grabs should not block Wayland input focus
This fixes menu issues with GTK+.
2014-04-12 00:24:27 -07:00
Jasper St. Pierre
b4293d46a6 display: Rewrite grab_op_should_block_wayland to be a tiny bit clearer 2014-04-12 00:24:27 -07:00
Jasper St. Pierre
30d534f17e display: Rename grab_op_is_wayland to grab_op_should_block_wayland
The idea here is that while we take a WM-side grab, like a compositor
grab or a resizing grab, we need to remove the focus from the Wayland
client.

We make a special exception for CLICKING operations, because these
are really an internal state machine while you're pressing on a button
inside a frame, and in this case, we need to not kill the focus.
2014-04-12 00:24:26 -07:00
Jasper St. Pierre
d004f3f990 display: Don't special-case is_wayland grabs when we sync_input_focus
meta_wayland_seat_repick already detects this case and reacts
accordingly.
2014-04-12 00:24:26 -07:00
Bastien Nocera
d53e04f4c8 Name all timeouts and idles
Better names can be used once we make more use of them.

https://bugzilla.gnome.org/show_bug.cgi?id=727979
2014-04-10 18:59:46 +02:00
Jasper St. Pierre
42bcad6549 display: Ignore the modmask passed into meta_display_begin_grab_op
A careful analysis of mutter's codebase shows that nothing actually
passes anything but 0 to this. gnome-shell has one instance, but it's
most likely a mistake.

Remove the grab_mask field and the one place in keybindings.c that uses it.

The parameter to begin_grab_op is left in for API compatibility reasons.
2014-04-07 17:45:52 -04:00
Jasper St. Pierre
b0ea0afd2f display: Remove meta_display_get_ignored_modifier_mask
It's unused, in both here and in gnome-shell.
2014-04-07 17:16:29 -04:00
Jasper St. Pierre
96b6dcec01 display: Kill some bad whitespace 2014-04-07 16:00:17 -04:00
Jasper St. Pierre
b9e9595e8b errors: Kill off meta_error_trap_push_with_return
It isn't special; it's just an alias for meta_error_trap_push.
2014-04-07 10:37:03 -04:00
Jasper St. Pierre
75de29f5f7 errors: Remove vestigals of old error trap implementation 2014-04-07 10:37:03 -04:00
Jasper St. Pierre
fa60824096 cursor-tracker: Make set_grab_cursor take a MetaCursorReference 2014-03-31 18:27:19 -04:00
Jasper St. Pierre
490e1c8c3b idle-monitor: Split the DBus implementation to a separate file 2014-03-30 22:55:02 -04:00
Jasper St. Pierre
0f9b29b140 display: Don't double-free the screen
We already free the screen once in meta_display_close.

This fixes a crash when trying to restart mutter.
2014-03-28 13:58:50 -04:00
Jasper St. Pierre
3f70bdd331 display: Revert API break for get_tab_list
gnome-shell apparently uses this, and we shouldn't break it.
2014-03-27 12:48:05 -04:00
Jasper St. Pierre
cd905a34fb compositor: Kill off MetaCompScreen
Compositors haven't been able to manage more than one screen for
quite a while. Merge MetaCompScreen into MetaCompositor, and update
the API to match.

We still keep MetaScreen in the public compositor API for compatibility
purposes.
2014-03-26 12:04:48 -04:00
Jasper St. Pierre
47aa583625 display: Kill off grab_screen
Just like active_screen, the screen can always be inferred
from the MetaDisplay, so there's no point in keeping it around.
2014-03-26 12:04:48 -04:00
Jasper St. Pierre
d7519f4ebc Remove any possibility for zaphod mode
We previously separated out MetaDisplay and MetaScreen. mutter
would only manage one screen, but we still kept a list of screens
for simplicity.

With Wayland support, we no longer care about the ability to
manage more than one screen at a time. Remove this by killing
the list of screens, in favor of having just one MetaScreen
in MetaDisplay.

We also kill off active_screen at the same time, since it's
not necessary anymore.

A future cleanup should merge MetaDisplay and MetaScreen. To avoid
breaking API, we should probably keep MetaScreen around as a dummy
type.
2014-03-26 12:04:48 -04:00
Florian Müllner
71be7e8493 display: Fix compiler warning
Don't leave a variable uninitialized in case we don't find a matching
surface.
2014-03-25 16:32:22 +01:00
Jasper St. Pierre
0de83ebfb5 display: Remove get_leader_window
It's unused.
2014-03-20 16:46:21 -04:00
Jasper St. Pierre
46b4d6c0f0 Move request_take_focus to window-x11
This will let us kill off send_icccm_message
2014-03-20 16:06:24 -04:00