Commit Graph

411 Commits

Author SHA1 Message Date
Kristian Høgsberg
6cd26e0939 wayland: Use event->key.time for setting key event time
We were using event->button.time before. That works because it's part of
the common event header, but it's wrong.
2014-05-27 10:24:34 -07:00
Kristian Høgsberg
544e1ac1d1 wayland: Remove unused XSERVER_TIME_IS_LATER macro 2014-05-27 10:24:34 -07:00
Jasper St. Pierre
0d402601b2 wayland: Add support for show_window_menu 2014-05-24 15:55:55 -04:00
Jasper St. Pierre
8c15389d76 wayland: Clean up init code a tiny bit 2014-05-16 15:35:47 -04:00
Jasper St. Pierre
ffebedae40 wayland: Simplify roundtrip initialization
All the globals we care about should appear before doing anything
else, up-front, so a single round-trip after adding the registry
should be more than enough.
2014-05-16 15:35:29 -04:00
Jasper St. Pierre
72e9937e00 wayland: Remove unused stuff 2014-05-16 15:24:37 -04:00
Jasper St. Pierre
75ecdf50a3 wayland: Fix GtkMenuButton popups in a terrible, hacky way
Since you can't take grabs on unmapped windows, GtkMenu takes a grab on
the menu in a convoluted way: it first grabs another window, shows the
menu window, and then transfers the grab over to the GtkMenu widget.

For normal menubars, this is perfectly fine, as the first window it grabs
is our toplevel, and that gets picked up in our transient path.  For
GtkMenuButton or other spurious uses of gtk_menu_popup, it creates a new
temporary input-only window which it takes the grab on, known as the "grab
transfer window". Since this window isn't a transient-for of our new menu
widget window, the grab isn't noticed when we go to show it, and thus the
menu ends up as a new toplevel.

Add a special hack to GtkMenu and the Wayland backend which lets us notice
this "grab transfer window", and include it in our grab finding path.

It's sort of terrible to have to hack up the widgets instead of just the
backend, but the alternative would be an entirely new window type which is
managed correctly by GDK. I don't want to write that.
2014-05-15 18:02:45 -04:00
Jasper St. Pierre
f6b3f0bfc7 wayland: Clean up function to find the input seat 2014-05-15 18:02:45 -04:00
Jasper St. Pierre
7052795a80 wayland: Clean up code to find the correct seat for a window 2014-05-15 18:02:45 -04:00
Jasper St. Pierre
38445e6326 wayland: Ack the configure immediately 2014-05-13 16:21:57 -04:00
Jasper St. Pierre
9b4668c82c wayland: Update to latest xdg-shell protocol 2014-05-13 02:39:59 -04:00
Carlos Garnacho
ac5993a7e7 wayland: Fix c&p typo in touch capabilities handling. 2014-05-06 18:37:57 +02:00
Adel Gadllah
b395929a16 gdkscreen-wayland: Emit monitors-changed when the output scale changes
https://bugzilla.gnome.org/show_bug.cgi?id=729013
2014-04-26 17:32:57 +02:00
Carlos Garnacho
1a2a5a44bd wayland: handle the wl_touch interface
The events are routed through a new slave device with type
GDK_SOURCE_TOUCHSCREEN, minimal tracking of touches is done
to keep the state for each of those.

https://bugzilla.gnome.org/show_bug.cgi?id=728426
2014-04-22 23:54:43 -04:00
Carlos Garnacho
af8d6e6549 wayland: Separate master devices from seat capabilities
The master pointer/keyboard pair should never disappear or be
inconsistent. The seat capabilities are now reflected through
slave devices, those may come and go freely as the seat
capabilities change. This also enables adding further capabilities
to handle eg. touch.

https://bugzilla.gnome.org/show_bug.cgi?id=728426
2014-04-22 23:50:55 -04:00
Jasper St. Pierre
ee3d00c391 wayland: Map the window immediately on show 2014-04-22 19:19:14 -04:00
Jasper St. Pierre
4e72674bf3 wayland: Remove useless hint set 2014-04-22 19:19:14 -04:00
Jasper St. Pierre
938725fff0 wayland: Remove VISIBILITY_NOTIFY event
VISIBILITY_NOTIFY is already known to be unreliable.
2014-04-22 19:19:14 -04:00
Jasper St. Pierre
e4e75a94f5 wayland: The xdg_surface.delete event was renamed to close 2014-04-17 13:14:44 -04:00
Jasper St. Pierre
eb5cc3da9b wayland: set_transient_for was renamed to set_parent 2014-04-12 08:20:33 -07:00
Jasper St. Pierre
e91e447db7 wayland: Don't pass dx/dy when we're resizing
They're ignored by the server.
2014-04-12 08:20:33 -07:00
Jasper St. Pierre
8201e2bfab wayland: Merge buffer implementations 2014-04-12 08:20:33 -07:00
Matthias Clasen
6cc0130147 wayland: Mark ourselves as not supporting compositing
The compositing that is meant here is really specific to the
X11 Composite extension, and does not apply to Wayland.

This is very rarely used functionality anyway, and none of
the other backends support it.
2014-03-24 12:49:32 -04:00
Matthias Clasen
a8036a5143 wayland: Fix northeast resizing
Surprisingly, the same corner that was broken for resizing under
X is also broken under Wayland, for an entirely different reason.
2014-03-21 18:24:38 -04:00
Jasper St. Pierre
084859d150 wayland: Mark ourselves as not supporting bounding shapes
Theoretically, we apply the shape mask client-side ourselves
with an ARGB32 pixmap and intersect it to get a union shape,
but I don't particularly care enough to write that code.

Realistic application code using bounding shapes in 2014 is
quite rare.
2014-03-20 14:28:25 -04:00
Jasper St. Pierre
3472235232 wayland: Add support for input regions 2014-03-20 14:28:24 -04:00
Jasper St. Pierre
385b55f203 wayland: Refactor how opaque region is handled
Move to a sync system just like the rest of the properties.
2014-03-20 14:28:24 -04:00
Jasper St. Pierre
16b5504eb9 wayland: Remove cruft in set_keep_above / set_keep_below
It's been decided: these will most likely never be supported on
Wayland, so remove the "stub" implementation of them.
2014-03-17 15:51:46 -04:00
Jasper St. Pierre
4eb7dac75b wayland: Fix get_frame_extents
We need to traverse up the hierarchy for windows here. Just use
our existing helper method for this.
2014-03-17 15:51:46 -04:00
Jasper St. Pierre
efdd68b3b0 Implement get_root_origin generically for all backends
It seems that some backends implemented get_root_origin wrong
and returned the client window coordinates, not the frame window
coordinates. Since it's possible to implement generically for all
windows, let's do that instead of having a separate impl vfunc.
2014-03-17 15:51:46 -04:00
Jasper St. Pierre
0320c3be8e wayland: Fix "fake root" coords
We were incorrectly summing up our own window over and over
rather than the coordinates of the parent windows.
2014-03-17 15:36:41 -04:00
Jasper St. Pierre
494e253e47 wayland: Add a giant doc comment explaining "fake root" coordinate space 2014-03-17 15:36:41 -04:00
Jasper St. Pierre
92833a0b82 wayland: Properly apply the fake root offset to event coordinates
GdkEvent's x_root and y_root values should be in the same "fake root
window" coordinate space as gdk_window_get_root_coords.
2014-03-17 15:36:41 -04:00
Jasper St. Pierre
35a1f49db5 wayland: Fill in x_root / y_root of events properly
Lots of code, including dragging code in GtkWindow, use these
fields. Setting them to 0 causes lots of strange and weird bugs.

Use the same "hack" from query_device_state of just using
win_x / win_y for now. We'll convert this to the proper fake root
coordinate system used by get_root_coords in the next commit.
2014-03-17 15:36:41 -04:00
Jasper St. Pierre
c737045462 xdg-shell: Update to latest state change mechanism 2014-03-12 23:53:04 -04:00
Jasper St. Pierre
fb51bbc565 wayland: Clean up a bit 2014-03-10 13:40:04 -04:00
Jasper St. Pierre
05b8609f80 wayland: Move some code around 2014-03-10 13:40:04 -04:00
Jasper St. Pierre
c92a16fcf5 wayland: Fix submenu positioning
window->x / window->y are in "root window coordinates", e.g. relative
to the topmost toplevel. However, the coordinates in get_xdg_popup are
relative to the passed-in surface, so we need to do the reverse
translation here.
2014-03-10 13:40:04 -04:00
Jasper St. Pierre
b922e0e213 Remove the return value of GdkWindowImpl::get_root_coords
It's unused by callers, and the historical return values are
undocumented, so just remove it now.
2014-02-27 21:06:35 -05:00
Jasper St. Pierre
056ca21e2f wayland: Seal up a non-declared public member 2014-02-27 17:33:09 -05:00
Jasper St. Pierre
7d67530982 wayland: Remove old, outdated comment 2014-02-27 17:00:56 -05:00
Jasper St. Pierre
08d0bedb28 wayland: Fix margins at startup
GtkWindow calls set_shadow_width then maps the window, meaning
that we never set the margin. Save it when we set and then set
it when we create the XDG surface.
2014-02-27 16:55:02 -05:00
Giovanni Campagna
ad2f96ff48 Gdk: fix wrong user_data handling in resize_cairo_surface()
Instead of destroying the surface in the backend if this is
unable to resize, let the core code do it, and do it properly.

Based on a patch by Benjamin Otte.

https://bugzilla.gnome.org/show_bug.cgi?id=725172
2014-02-26 00:04:41 +01:00
Jasper St. Pierre
084c2feb7e wayland: Don't destroy the cairo surface when resizing it
The code in GDK is incredibly broken and nobody is quite sure what's
right-side-up and what's upside down, but this breaks mutter-wayland
now, so let's remove it. It might leak, but we should probably do a
full restructuring of GDK drawing to fix it.
2014-02-23 16:07:38 -05:00
Rui Matos
6ea4bf8a9d wayland: Fix gdk_window_wayland_resize_cairo_surface()
Like in other backends (except X) we can't resize cairo image surfaces
so let's sync the code here with what the other backends do.

This prevents the painting machinery above us to paint on the wrong
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=724968
2014-02-23 18:40:29 +01:00
Jasper St. Pierre
7fbcff8d71 xdg-shell: Update for focused_set / focused_unset rename 2014-02-18 16:48:42 -05:00
Jasper St. Pierre
6845eade49 wayland: Update to new xdg-shell pinging standards 2014-02-18 16:47:34 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
Jasper St. Pierre
bfe8a354cd wayland: Add support for set_shadow_width 2014-02-07 19:33:17 -05:00