Commit Graph

226 Commits

Author SHA1 Message Date
57037a45b8 wayland-surface: Don't do pending move/resizes on all commits
We assume in meta_window_wayland_move_resize that the next commit that
changes the geometry will always be for our next pending operation, so
if we have a move pending on a resize, the next commit will trigger the
move. This is, of course, fundamentally wrong.

We broke this assumption even more now that we don't fizzle out calls to
meta_window_move_resize_internal and now call it on every commit, which
means that a simple damage and then commit would complete a pending
move.

This was even broken by apps like weston-terminal, which, when clicking
on the maximize button, first redraws the terminal with the maximize
button state back on hover on press, and would only redraw when it got
the configure event with the coordinates.

To track the correct commit to apply the move for, we implement the
ack_configure request and ignore all move/resizes that happen before
that.

Right now, we actually fizzle out the entire move/resize if there's a
future pending configure we're waiting on.
2014-07-27 18:09:12 +02:00
b60e02956d wayland-surface: Add some extra protection
Make sure we're not configuring some sort of weird surface.
2014-07-27 18:09:12 +02:00
817995d97f wayland-surface: Make sure to zero out the geometry
Otherwise our implicit surface geometry calculation will be junk.
2014-07-27 15:23:00 +02:00
930361b988 wayland: Handle window drags for touch events
The grabbing state is now checked for both pointer/touch devices
within the seat, and the grab start coordinates returned by
meta_wayland_seat_get_grab_info().

https://bugzilla.gnome.org/show_bug.cgi?id=733631
2014-07-24 18:05:56 +02:00
c9a2a561f8 wayland: Use a named #define for the xdg-shell version 2014-07-17 17:48:30 -04:00
ac0b2fdc6f wayland: Use our named #define for the wl_shell version 2014-07-17 17:47:14 -04:00
46b9984414 wayland: Don't leak an extra xdg_shell resource
No idea how this happened...
2014-07-17 17:47:10 -04:00
f9743e2174 wayland: Fix indentation 2014-07-17 17:39:43 -04:00
692eb4d957 wayland: Replace set_margin with set_window_geometry 2014-07-17 16:45:37 -04:00
826751429b wayland: Treat the size in the configure event as frame rect coordinates 2014-07-17 16:45:37 -04:00
b5f46c9171 wayland: Calculate the window geometry based on all subsurfaces
Not just the main surface.
2014-07-17 16:20:19 -04:00
166b8c042c wayland: Don't fizzle out attaches 2014-07-17 16:18:01 -04:00
90d7737fc1 wayland: Don't require a new buffer to move windows with dx/dy
This doesn't match what Weston does. I don't know of any apps that this
fixes (we don't have any apps that even use non-zero dx/dy, I don't
think), but this is part of a cleanup for window geometry.
2014-07-17 14:51:23 -04:00
567ca15610 xdg-shell: Update to latest 2014-07-17 14:51:12 -04:00
7159d3bc35 window: Remove the concept of surface_mapped
The implementation was just wrong. We now consider it an error to attach
a NULL buffer to an xdg_surface. Users should destroy the surface properly.
2014-07-14 14:49:58 -04:00
12d0c98fb5 wayland: Remove an unused field from MetaWaylandFrameCallback 2014-07-10 13:30:05 -04:00
66eb4bc34c wayland-surface: Make sure to apply the margin before moving the window 2014-07-03 10:31:26 -04:00
e33c58297d wayland-surface: Subsurfaces start out in synchronous mode 2014-06-11 12:34:44 -04:00
5350120db4 wayland-surface: Fix whitespace 2014-06-11 12:34:17 -04:00
626516d12e window: Remove meta_window_move as well
Move to meta_window_move_frame everywhere...
2014-05-27 15:44:33 -04:00
31db32e826 Actually implement opening the app menu
The last commit added support for the "appmenu" button in decorations,
but didn't actually implement it. Add a new MetaWindowMenuType parameter
to the show_window_menu () functions and use it to ask the compositor
to display the app menu when the new button is activated.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:40:06 +02:00
efcd7d86e7 wayland: Add support for show_window_menu 2014-05-24 15:56:04 -04:00
6408e59c7c wayland: Move checks for grabbing into a central location
This means that we won't have as much work to do to introduce similar
checks for touch.
2014-05-22 10:58:07 -04:00
e2b7b26f28 wayland: Use meta_window_move to position xdg_popup windows
This makes sure we set the user rect as well, which is necessary to
have things not "snap back" to weird locations.
2014-05-14 12:01:11 -04:00
7732447abc wayland: Update to latest xdg-shell protocol 2014-05-12 18:25:23 -04:00
bca210db45 Revert "Update to latest xdg-shell protocol"
This reverts commit fd5c14550a.

Again, pushed by accident, whoops.
2014-05-05 19:09:07 -04:00
fd5c14550a Update to latest xdg-shell protocol 2014-05-05 14:15:03 -04:00
afaab8aef2 wayland-surface: Fix warnings 2014-05-04 15:33:38 -04:00
fa29a1a99e Fix last commit
Actually do the changes from the review ... pushed old version of the
patch :/
2014-05-03 12:00:27 +02:00
f9bffae9fd wayland: Scale native surfaces for hidpi
Scale surfaces based on output scale and the buffer scale set by them.
We pick the scale factor of the monitor there are mostly on.

We only handle native i.e non xwayland / legacy clients yet.

https://bugzilla.gnome.org/show_bug.cgi?id=728902
2014-05-03 10:11:55 +02:00
31c925c602 wayland: Add basic hidpi support
Advertise the scale factor on the output and transform pointer and damage
events as well as input and opaque regions for clients
that scale up by themselves i.e use set_buffer_scale.

We do not scale any 'legacy' apps yet.

https://bugzilla.gnome.org/show_bug.cgi?id=728902
2014-05-03 10:11:51 +02:00
8461b2c910 window: Move move_resize_wayland to window-wayland.c
The move/resize logic is still busted for top/left resizes... sigh.
2014-04-28 18:22:55 -04:00
c8d0a66921 wayland-surface: Ignore bufferless damage
Instead of letting a buggy client kill us.
2014-04-27 16:18:09 +02:00
dd4d6af185 wayland-surface: Only call process_damage when we have any damage
This fixes a crash when a client commits a surface
without attaching a buffer.
2014-04-27 16:12:02 +02:00
c95c501a5b meta-wayland-surface: Clip damage to buffer dimensions
A client can send us damage that exceeds the buffer size, protect against that
by clipping the damage to the buffer's region.
2014-04-23 22:32:17 +02:00
2435d132ac Revert "Update to latest xdg-shell protocol"
This reverts commit eed03d38b0.

This was pushed by accident.
2014-04-23 16:01:02 -04:00
eed03d38b0 Update to latest xdg-shell protocol 2014-04-23 14:23:13 -04:00
59fc9d832b wayland: Clean up surface creation 2014-04-22 18:27:44 -04:00
0bf5c831d5 wayland: Remove unused list of surfaces 2014-04-22 18:27:44 -04:00
777a6d4570 surface: Merge version logic inline 2014-04-22 18:27:43 -04:00
88040d6b8a wayland: Have a consistent _init pattern for subcomponents 2014-04-22 18:27:43 -04:00
6072e981a8 wayland: Kill extra includes to meta-wayland-stage.h
No idea why these are still included at all...
2014-04-22 16:56:02 -04:00
29439f8de2 wayland-surface: Fix offset with window dragging
The grab_x / grab_y here were converted from fixed integers to
floats, but we forgot to update one place in the code that used
them as fixed integers.
2014-04-18 18:23:27 -04:00
97a69cee5a wayland-surface: Simplify move_double_buffered_state
The majority of the data we can simply copy from one to the other.
2014-04-18 18:23:27 -04:00
2e2dd247ce wayland: Rename pending_surface_state => pending
This matches what's normally done.
2014-04-18 18:15:41 -04:00
de6054d557 wayland: Remove an extraneous variable 2014-04-18 18:15:41 -04:00
db56a7cecb wayland: Rename DoubleBufferedState to PendingState
I was talking with other people and they became confused at the
term "double-buffered", since we were also talking about
double-buffering in general, e.g. swapping between two buffers.

Instead, we'll adapt the "pending state" nomenclature that we
already use for the field / variable names.
2014-04-18 18:15:36 -04:00
f92c1af24a wayland-surface: Merge actor_surface_commit back in
Since we do it unconditionally now, the code flows better
if it's inline with commit_double_buffered_state.
2014-04-18 15:43:26 -04:00
4ab71ec942 wayland: Make subsurfaces reactive 2014-04-18 12:26:31 -04:00
ae0853ed86 seat: Move cursor storage to MetaWaylandPointer 2014-04-17 19:15:52 -04:00