1
0
Fork 0
Commit graph

414 commits

Author SHA1 Message Date
Jasper St. Pierre
0f47eae33a window-wayland: Split an if statement in two 2014-04-28 16:11:09 -04:00
Jasper St. Pierre
d1619e4f53 wayland-pointer: Remove the conditional around the surface actor too
The actor should always exist.
2014-04-27 10:39:19 -04:00
Adel Gadllah
c8d0a66921 wayland-surface: Ignore bufferless damage
Instead of letting a buggy client kill us.
2014-04-27 16:18:09 +02:00
Adel Gadllah
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
Adel Gadllah
657318d4d3 meta-wayland-pointer: Remove the surface->window conditional 2014-04-25 20:38:24 +02:00
Adel Gadllah
f051e05b0a meta-wayland-pointer: Transform coordinates relative to the surface_actor
Not the window_actor ..
2014-04-25 20:36:46 +02:00
Adel Gadllah
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
Jasper St. Pierre
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
Jasper St. Pierre
eed03d38b0 Update to latest xdg-shell protocol 2014-04-23 14:23:13 -04:00
Jasper St. Pierre
b501ca5a24 cursor: Remove cursor tracker from API 2014-04-23 12:15:11 -04:00
Jasper St. Pierre
59fc9d832b wayland: Clean up surface creation 2014-04-22 18:27:44 -04:00
Jasper St. Pierre
0bf5c831d5 wayland: Remove unused list of surfaces 2014-04-22 18:27:44 -04:00
Jasper St. Pierre
777a6d4570 surface: Merge version logic inline 2014-04-22 18:27:43 -04:00
Jasper St. Pierre
003ff3d255 wayland: Fix header file style 2014-04-22 18:27:43 -04:00
Jasper St. Pierre
88040d6b8a wayland: Have a consistent _init pattern for subcomponents 2014-04-22 18:27:43 -04:00
Jasper St. Pierre
eaf85ddec9 wayland: Split outputs to another file 2014-04-22 18:25:34 -04:00
Jasper St. Pierre
fa2e1e4eda wayland-seat: Clean up includes 2014-04-22 18:25:34 -04:00
Jasper St. Pierre
2769683521 Rename MetaWaylandStage to MetaStage and put in compositor/ 2014-04-22 16:56:02 -04:00
Jasper St. Pierre
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
Jasper St. Pierre
168ede9374 compositor: Create the MetaWaylandStage here 2014-04-22 16:56:01 -04:00
Jasper St. Pierre
a0d608e083 wayland: Remove the stage destroy hook
We assert fail / segfault when pressing the "X" button anyway, so
I don't think it does us too much good.
2014-04-22 16:56:01 -04:00
Jasper St. Pierre
326740e00f Move the cursor renderer to the backend 2014-04-22 16:56:01 -04:00
Jasper St. Pierre
3c0ca1f2af wayland-stage: Fix a race condition early in init
If Xwayland takes too long to start up, Clutter can choose to draw, at
which point we'll crash because the MetaDisplay hasn't initialized yet.
2014-04-22 10:26:03 -04:00
Jasper St. Pierre
9a6f5e115d Revert "wayland-stage: Use the C setter for cursor-visible"
This reverts commit d1a31952de.

Whoops, I did not mean to push this one.
2014-04-21 21:07:47 -04:00
Jasper St. Pierre
731e1ed74f wayland-stage: Remove unused variable 2014-04-21 21:07:47 -04:00
Jasper St. Pierre
eba5648c27 wayland-stage: Add missing include
Again, had it locally, forgot to amend.
2014-04-21 21:07:47 -04:00
Jasper St. Pierre
d1a31952de wayland-stage: Use the C setter for cursor-visible
This makes meta_wayland_stage_new(); synonymous with g_object_newv(...);
2014-04-21 21:05:23 -04:00
Jasper St. Pierre
13a444482a wayland-stage: Don't use the Wayland seat to find the cursor tracker
Simply look it up on the seat itself.
2014-04-21 21:05:23 -04:00
Jasper St. Pierre
9d780bca7a wayland-stage: Cut down on dependencies 2014-04-21 21:05:23 -04:00
Jasper St. Pierre
b6a80934d6 backend: Move pointer constrainment code to native backend 2014-04-21 21:05:23 -04:00
Jasper St. Pierre
c44b1d730d backends: Move MonitorManager creation to MetaBackend as well 2014-04-21 20:25:21 -04:00
Jasper St. Pierre
d189ddcc86 Split out the code that renders the code into a MetaCursorRenderer
Right now, this is the same exact same mess it's always been, but
it will be fixed up soon with backend-specific renderers.
2014-04-21 20:25:20 -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
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
02c31ac069 data-device: Clean up slightly 2014-04-20 12:03:24 -04:00
Jasper St. Pierre
3f375c9426 pointer: Remove get_focus_surface
Yeah, I was wrong, it doesn't improve code clarity.
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
ceb0f1005d pointer: Repick on update, not on handle_event
pointer->current needs to always be the surface under the pointer,
even when we have a grab. We do need to make sure we keep the focus
surface the same even when we have a grab, though, so add logic
for that.
2014-04-20 12:03:24 -04:00
Jasper St. Pierre
c9e99ebbbf pointer: Move update up
It seems that I forgot or messed this up in one of my reshufflings.
2014-04-18 18:56:01 -04:00
Jasper St. Pierre
020f209c45 pointer: Split out the code that gets the proper focus surface as well 2014-04-18 18:56:01 -04:00
Jasper St. Pierre
45df3e41c5 pointer: Split out the code that sets the focus surface 2014-04-18 18:56:01 -04:00
Jasper St. Pierre
1a723954fc pointer: Only the focus_surface should only be influenced by the grab
... not the normal current. That should *always* be the surface under
the pointer, regardless of events.
2014-04-18 18:56:01 -04:00
Jasper St. Pierre
3e554efc70 pointer: Clean up repick_for_event a bit 2014-04-18 18:56:01 -04:00
Jasper St. Pierre
d68da0b8cf pointer: Merge update_current_focus and repick_for_event
In order to correctly fix the issue to make sure we only set the
focused surface to NULL during a grab, but not the current surface,
we need to merge update_current_surface back into repick_for_event
so we have more control over the behavior here.
2014-04-18 18:56:01 -04:00
Jasper St. Pierre
de7a644656 pointer: Unset the window cursor when we do a pick
... not when we do an update.

We only repick when we handle events, not when we update. Perhaps
this is a mistake.

Since update runs before handle_event, this means that when we
drop a grab, update will notice the NULL surface, since we haven't
repicked after the event, and then we'll repick the correct surface.
The end result is that you see a root cursor after a grab ends,
rather than the correct window cursor.

This doesn't fix it, since the current surface becomes NULL when
we start the grab. But it does make the code here more correct when
we fix that bug.
2014-04-18 18:56:01 -04:00
Jasper St. Pierre
16bcbd1a34 pointer: Reindent 2014-04-18 18:56:01 -04:00
Jasper St. Pierre
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
Jasper St. Pierre
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
Jasper St. Pierre
2e2dd247ce wayland: Rename pending_surface_state => pending
This matches what's normally done.
2014-04-18 18:15:41 -04:00
Jasper St. Pierre
de6054d557 wayland: Remove an extraneous variable 2014-04-18 18:15:41 -04:00