Jasper St. Pierre
806a666950
Make the native backend build-optional
2014-05-29 12:43:08 -04:00
Jasper St. Pierre
fe823b3553
events: Improve check for native backend
2014-05-29 12:43:07 -04:00
Jasper St. Pierre
550f1989ff
window: Complete moving enter/leave handling here
2014-05-19 15:03:05 -04:00
Jasper St. Pierre
4334135c52
events: Make sure to reset current_time after handling events
...
Otherwise, we'll have a stale value leftover in current_time that
won't be reset until the next event.
2014-05-09 11:51:28 -04:00
Jasper St. Pierre
03c4de5590
events: Set display->current_time when we start processing the event
...
Otherwise, the time will be refetched during processing.
2014-05-09 11:51:28 -04:00
Jasper St. Pierre
7a109a18af
events: Move window button handling to window.c
...
Look at how clean GCD is now!!!
2014-05-08 15:34:27 -04:00
Jasper St. Pierre
d9b72b0f43
events: Clean up event replay code
2014-05-08 15:30:09 -04:00
Jasper St. Pierre
a7ea54bd7d
events: Swallow all events directly on windows
...
This is how the X11 mode works.
2014-05-08 15:28:06 -04:00
Jasper St. Pierre
df642b96e2
events: Replace a switch statement with a simple if test
2014-05-08 15:28:06 -04:00
Jasper St. Pierre
f56cc1f733
events: Remove extra check for certain grab op
...
We already explicitly test that there's no grab op right below.
2014-05-08 15:28:06 -04:00
Jasper St. Pierre
f5bff4b7f3
events: Move the overlay_key_only_pressed handling to keybindings.c
...
Now the switch statement is entirely about window operations.
2014-05-08 15:28:06 -04:00
Jasper St. Pierre
bbfdf5dd2a
events: Move keybindings event handling out of the giant switch
2014-05-08 15:28:06 -04:00
Jasper St. Pierre
9b95eda42a
events: Remove an unnecessary check
2014-05-08 15:28:06 -04:00
Jasper St. Pierre
2d225a3386
events: Don't check if we have the grab to raise / focus a window
...
It isn't necessary. As an X11 compositor, we'll only see the event
if we have the grab on the window, anyway.
This was causing issues moving windows as a Wayland compositor.
2014-05-08 14:19:22 -04:00
Jasper St. Pierre
2101c8357b
Move sync_request_* handling mostly to window-x11
2014-04-29 17:58:23 -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
861cfc23df
x11: Make sure to handle RANDR events from the right connection
2014-04-23 12:15:12 -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
3d091e514d
backend: Poll events from the host X11 server ourselves
...
I was accidentally pulling events from the Xwayland server under
nested for the idle monitor, which is wrong. Whoops.
2014-04-22 10:26:03 -04:00
Jasper St. Pierre
31d744195d
backends: Build MetaBackend subclasses for each backend
2014-04-21 20:25:21 -04:00
Jasper St. Pierre
00ea9bf14b
backends: Start on an initial MetaBackend object
...
This isn't great so far -- all we did is put the idle monitors here
instead. We'll soon have separate backend subclasses for the two
backends.
2014-04-21 20:25:21 -04:00
Jasper St. Pierre
f3ee9be4cb
idle-monitor: Use the XSync idle monitor under X11 nested
2014-04-21 20:25:20 -04:00
Jasper St. Pierre
adf0d08585
events: Clean up a bit
2014-04-21 12:15:23 -04:00
Jasper St. Pierre
813206393a
events: Handle move/resize grab ops as a first special case
2014-04-21 12:14:29 -04:00
Jasper St. Pierre
bec3db3068
events: Add explicit break
...
This doesn't particularly matter, since we fall through into a default
case that does nothing right below, but this matches the other paths
and it prevents us from falling into a trap if we add other event types
below.
2014-04-20 13:00:51 -04:00
Jasper St. Pierre
cef2745bc0
window: Properly end grab ops started from a keybind / menu
...
If we start a grab op from a keybind / menu, we'll handle the
ButtonPress and drop the grab then, never giving the window a chance
to handle what it needs to do before the grab is dropped.
This means that if you use Alt+F7 to move a window around, move it
to a side-tiling or maximization area, and then left-click, it will
just hang there in the sky.
2014-04-20 13:00:51 -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
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
Rui Matos
6219ae782a
events: Update current_time as best as we can on misc X events
...
Instead of always setting it to CurrentTime.
2014-04-15 20:38:26 +02:00
Rui Matos
1169e104cb
events: Bypass both gtk+ and the compositor for SelectionClear
...
We can't do any further processing after this since we have already
freed most of our structures including the MetaDisplay.
2014-04-15 20:38:24 +02:00
Giovanni Campagna
c55f64fdf2
x11: fix enter/leave events for frames
...
We need to pass all events on frames to GTK, even if we handled
them internally, to make sure that the hover state is properly
updated.
2014-04-12 03:16:40 +02:00
Jasper St. Pierre
797c46ba7d
events: Fix event handling for window menus under X11
...
We need to pass XI_Enter / XI_Leave events for GTK+ windows to GTK+,
rather than eating them.
2014-04-09 11:38:49 -07: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
e2b24092d6
events: Don't pass any X input events on to Clutter / GTK+
2014-04-07 10:37:02 -04:00
Jasper St. Pierre
0e6570b09b
events: Early exit when we get a SN notification event
...
Nothing else needs to see this.
2014-04-07 10:37:02 -04:00
Jasper St. Pierre
be02fa1120
xwayland: Switch to the new Xwayland DDX
2014-04-02 13:24:57 -04:00
Jasper St. Pierre
bce1d5117b
Start creating different subdirectories for each backend
2014-03-31 23:44:47 -04:00
Jasper St. Pierre
78457cf7b4
idle-monitor: Create separate subtypes for backend-specific idle monitors
...
The separation here isn't 100% clean yet, as there's common
parts that are still protocol specific. We'll clean that up
in the next commit.
2014-03-30 22:55:03 -04:00
Jasper St. Pierre
1e2bdcc3c5
idle-monitor: Move reset_idletime handling to events.c
...
It's not specific to the Wayland protocol at all, and it's not really
a Wayland compositor thing. This should eventually be in the native
backend.
2014-03-30 22:55:02 -04:00
Jasper St. Pierre
afce448281
Kill meta_ui_add_event_func / remove_event_func
...
The reason we don't simply use gdk_window_add_filter directly is
because of some twisted idea that any GDK symbol being used from
core/ is a layer violation. While we certainly want to keep any
serious GDK code out of ui/, event handling is quite important
to have in core/, so simply use a GDK event filter directly.
2014-03-30 22:55:01 -04:00
Jasper St. Pierre
e10fd19d24
events: Make sure to check the event window of the MapNotify
...
This was lost in a rebase when killing off zaphod mode.
2014-03-28 13:46:46 -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
Jasper St. Pierre
337db2a660
window: Kill off the rest of colormaps
...
I removed the XInstallColormap / XUninstallColormap but forgot
to remove the fields in MetaWindow and the code to set them.
2014-03-20 16:27:22 -04:00
Jasper St. Pierre
ab2224686a
events: Clean up trailing whitespace
2014-03-20 15:54:16 -04:00
Jasper St. Pierre
24b08d1a36
Move event handling to a new file
...
display.c is getting a bit crowded. Move most of the handling
out to another file, events.c.
The long-term goal is to have generic event handling here, with
backend-specific handling for the types of windows and such.
2014-03-20 15:46:32 -04:00