Commit Graph

6948 Commits

Author SHA1 Message Date
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
e02bf13206 seat: Remove incorrect comment above repick 2014-04-17 19:15:53 -04:00
Jasper St. Pierre
4b7d77864a seat: Move update_pointer to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
72e4d42267 seat: Reorder handle_event helpers near handle_event 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
1abdd7be10 seat: Move pointer interface over to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
f3d88ca1d1 seat: Rewrite the pointer interface in terms of MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
15d89d451f seat: Move update_cursor_surface to the end
It's now only a public API.
2014-04-17 19:15:52 -04:00
Jasper St. Pierre
4510b82361 seat: Move set_cursor_surface and all that tracking to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
ae0853ed86 seat: Move cursor storage to MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
76544ff6e1 seat: Rewrite get_pointer / get_keyboard in terms of MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
dde96951a7 seat: Rewrite handle_scroll in terms of MetaWaylandPointer 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
24eb737858 keyboard: Remove the useless return value of init 2014-04-17 19:15:52 -04:00
Jasper St. Pierre
ddc7938961 keyboard: Reformat 2014-04-17 19:15:51 -04:00
Jasper St. Pierre
4f2dc77ec3 keyboard: Reorder
The correct order is:

init
release
update
handle_event
set_focus
start_grab
end_grab
other stuff
2014-04-17 19:15:51 -04:00
Jasper St. Pierre
678fa52ae1 seat: Reformat 2014-04-17 19:15:51 -04:00
Jasper St. Pierre
1be97f3d59 seat: Reorder 2014-04-17 19:15:51 -04:00
Jasper St. Pierre
30ecd7c770 keyboard: Gobble up key events whenever we have a focused surface
If we have a focused surface, we need to eat up key events, not
just if we have a non-empty focus resource list. The latter would
happen if we have a focused client but it never called get_keyboard.
2014-04-17 19:15:51 -04:00
Jasper St. Pierre
0dd27edb91 xwayland: Remove some unused includes 2014-04-17 16:23:37 -04:00
Jasper St. Pierre
6a44f04b51 xwayland: Stop using UNIX signals for readiness
The latest Xorg / Xwayland has support for -displayfd being used
in conjunction with an explicit display number. Use that to know
when the X server is ready, rather than UNIX signals, because
they're UNIX signals.
2014-04-17 16:23:37 -04:00
Jasper St. Pierre
745134e066 xwayland: Rename sp to something a bit more handy
We also want to create a socketpair for -displayfd instead
of using signals.
2014-04-17 16:23:37 -04:00
Jasper St. Pierre
72b1a2837d xwayland: Clean up display finding code
Split out and make it more manageable.
2014-04-17 16:23:37 -04:00
Jasper St. Pierre
e5ab4f13f1 xwayland: Put the filename in the error message 2014-04-17 16:23:37 -04:00
Jasper St. Pierre
14deeef8a7 xwayland: Use %m instead of explicit strerror 2014-04-17 16:23:37 -04:00
Jasper St. Pierre
57cc68096b cursor-tracker: Kill unused variable 2014-04-17 16:23:37 -04:00
Yosef Or Boczko
7af429150e Updated Hebrew translation 2014-04-17 20:03:09 +03:00
Jasper St. Pierre
d7ee5cf33d cursor: Remove the theme_cursor cache
It's unused.
2014-04-17 13:03:27 -04:00
Florian Müllner
a2fb2c05ae window: Queue a fullscreen check when moving between monitors
We track changes to windows fullscreen state and stacking order
to determine a monitor's in-fullscreen state, but missed the
obvious case of moving a fullscreen window between monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=728395
2014-04-17 18:30:16 +02:00
Florian Müllner
abd0ac2cc3 keybindings: Handle switch-to-workspace-{up,down,left,right} again
Commit 585fdd781c not only removed the tabpopup, but set invalid
handlers (a.k.a. NULL) for those shortcuts; add back handling of
basic handling of those shortcuts by switching instantly without any
popups.

https://bugzilla.gnome.org/show_bug.cgi?id=728423
2014-04-17 17:05:38 +02:00
Jasper St. Pierre
8c0ef829c9 pointer/keyboard: Unset the entire focus when the surface is destroyed
Otherwise, we'll end up with dangling parts in our resource list.
2014-04-16 19:04:58 -04:00
Jasper St. Pierre
eb1c9175f9 wayland: Move the RESULT_RESIZED code to the proper place
We need to set this when we update window->rect, not when we simply
send out a configure event.
2014-04-16 16:31:45 -04:00
Jasper St. Pierre
f25243e121 wayland: Don't move the window when we're simply sending out a configure
If we're sending out a configure event, we can't immediately move the
window; we need to instead wait to apply the new position when the
client sends a new buffer.
2014-04-16 16:31:45 -04:00
Jasper St. Pierre
c1f4352683 window: Add proper interpretation of dx/dy
dx/dy should be against the regular window's rect, and need to
be ignored when we're resizing. Instead, we use gravity to anchor
the window's new rectangle when resizing.
2014-04-16 16:31:45 -04:00
Jasper St. Pierre
0797206cc2 window: Use the window's rect for checking whether this is a resize
The expected_rect is going to die.
2014-04-16 16:31:45 -04:00
Jasper St. Pierre
260b6d02f2 wayland: Simplify the move/resize code
The old protocol is out of date and broken for resizing at the
top/left. This is still as broken, but a lot simpler.
2014-04-16 16:31:45 -04:00
Florian Müllner
0440765cb7 keybindings: Expose new keybindings in g-c-c 2014-04-16 21:41:26 +02:00
Elad Alfassa
40214b72bf keybindings: Add keybindings to switch to last workspace
When using dynamic workspaces, the last workspaces can vary, so it makes sense
to have a keybinding to go directly to it.

https://bugzilla.gnome.org/show_bug.cgi?id=659288
2014-04-16 21:41:26 +02:00
Jasper St. Pierre
339a78718d pointer/keyboard: Support more than one focused resource
Sophisticated clients, like those using ClutterGtk, will have more
than one focused resource per client, as both Clutter and GDK will
ask for a wl_pointer / wl_keyboard. Support this naturally using
the same "hack" as Weston: multiple resource lists, where we move
elements from one to the other.
2014-04-16 15:31:53 -04:00
Jasper St. Pierre
f1034d0459 pointer/keyboard: Remove focus_resource_listener
In order to support multiple pointers for the same client, we're
going to need to kill it.

This will cause crashes for now, but will be fixed by the next
commit.
2014-04-16 15:30:42 -04:00
Jasper St. Pierre
edfaf3de49 pointer/keyboard: Stop using focus_resource for anything unessential 2014-04-16 15:30:41 -04:00
Jasper St. Pierre
bbec66c2d8 pointer/keyboard: Surfaces should always have resources
There's no possible way that they shouldn't.
2014-04-16 15:27:08 -04:00
Jasper St. Pierre
339b856d84 pointer: Clean up a tiny bit 2014-04-16 15:27:07 -04:00
Jasper St. Pierre
7560aaee73 pointer: Make sure to care about FFM even if the client didn't get a
resource
2014-04-16 15:27:03 -04:00
Jasper St. Pierre
2bcd4ab159 data-device: Don't poke into MetaWaylandKeyboard
It needs to know the wl_client that has keyboard focus, so add a simple
getter for that.
2014-04-16 15:26:58 -04:00
Jasper St. Pierre
86100936d9 util: Don't check whether zenity supports options
Doing this synchronously means that zenity tries to initialize GTK+.
Under Wayland, that will try to connect back to mutter as a display
server. We're waiting on zenity to exit, and zenity is waiting for
a connection response. Deadlock.

Simply assume that zenity will support all the options we feed it,
since it should be the correct version. Perhaps we should replace
our use of zenity with a simple helper binary that we know will
have all the right options if this still isn't good enough.
2014-04-15 17:20:42 -04:00
Florian Müllner
37de96ce86 build: Fix merge fallout
Commit 3ba8532bdc accidentally added a no-longer-existent file
back to DiSTFILES.
2014-04-15 22:58:51 +02:00
Florian Müllner
e81433f58d build: Complete rename of header file
Fallout from commit d5552cc372.
2014-04-15 22:34:07 +02: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
Florian Müllner
87bec99a0a window: Allow activation on non-active workspaces with proper timestamps
Our focus stealing prevention is still mostly inherited from metacity;
in particular, a (non-transient) window that is not on the current
workspace will not be given focus. This behavior made sense in the
GNOME 2 days, where workspaces were separated much more strictly.
However this is no longer the case in GNOME 3 - activating a launcher
will switch workspaces if necessary, and so will the app switcher.
There is no good reason to not do the same for other user actions
like clicking a URL or activating a search result, so allow activation
of windows on non-active workspaces if a proper timestamp is supplied,
assuming that this is a strong enough indication that we are dealing
with a legitimate user action.

https://bugzilla.gnome.org/show_bug.cgi?id=728018
2014-04-15 17:23:24 +02:00
Florian Müllner
5defe574d7 window: Treat CurrentTime as legal timestamp in activation
Effectively we have been accepting CurrentTime timestamps for years,
but still complained about "stupid pagers" when encountering them;
just accept that we will never limit treating 0 timestamps as current
time to pagers.

https://bugzilla.gnome.org/show_bug.cgi?id=728018
2014-04-15 17:23:22 +02:00