Adel Gadllah
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
Adel Gadllah
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
Jasper St. Pierre
43d6088ebb
window: Change meta_window_move_resize_internal to take a MetaRectangle
...
We construct one anyway, and most callers already pass in a rectangle
the long way around, so why not change the internal API?
2014-05-01 19:13:33 -04:00
Jasper St. Pierre
57bb297450
window-wayland: Fix interactive resizing from the top/left once more
...
Ugh. So in the fullscreen case, we need to make sure to specify that
it's a MOVE_ACTION so that we move to the saved position, but we
can't do that in the resizing case since we need to use the resized
rectangle.
The flags are really hurting us here. Perhaps we should make it the
client's responsibility to specify a complete rectangle which we
could resize to; then the weird-o logic would be self-contained in
each front-end.
I'm not convinced this covers all cases, especially when we could have
a dangling weird state pointer, but it fixes our existing two testcases.
2014-05-01 18:59:17 -04:00
Jasper St. Pierre
b773898a60
window-wayland: Fix resizing from the top/left once more
...
Restoring the position in our move_resize_internal implementation
is too late. We need to do it at ack-time, before we hand off the
new position to the constraints code.
2014-04-28 18:22:55 -04:00
Jasper St. Pierre
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
Jasper St. Pierre
eb0c4db46d
keyboard: Don't use a grab interface for sending key events
2014-04-28 16:30:51 -04:00
Jasper St. Pierre
19e97ec567
keyboard: Remove start_grab / end_grab
...
It's unused.
2014-04-28 16:30:50 -04:00
Jasper St. Pierre
ce5c029509
window-wayland: Make sure to save where the position for server-initiated resizes
...
For the server-initiated resize case, like unmaximize or some forms
of tiling, we dropped the x/y of the server-assigned rectangle on the
floor, which meant the surface didn't move to where it needed to be in
that case. Now, save it internally, and combine it with the dx/dy passed
in during attaches to figure out where we actually need to be.
Make sure to only use it for when we send out a configure notify. We
should use the passed in rectangle for other scenarios, like a
client-initiated resize.
This fixes incorrect surface placement after unmaximization.
2014-04-28 16:23:38 -04:00
Jasper St. Pierre
647743aa5f
Revert "window-wayland: Don't enter the only-moving path for Wayland
...
resizes"
We're going to use the old code structure now.
This reverts commit 23ae11043f
.
2014-04-28 16:23:38 -04:00
Jasper St. Pierre
e94f169d4e
Revert "window-wayland: Make sure to save where the position for server-initiated resizes"
...
This is wrong for client-initiated resizes now.
This reverts commit e6b0525c70
.
2014-04-28 16:23:38 -04:00
Jasper St. Pierre
e6b0525c70
window-wayland: Make sure to save where the position for server-initiated resizes
...
For the server-initiated resize case, like unmaximize or some forms
of tiling, we dropped the x/y of the server-assigned rectangle on the
floor, which meant the surface didn't move to where it needed to be in
that case. Now, save it internally, and combine it with the dx/dy passed
in during attaches to figure out where we actually need to be.
This fixes incorrect surface placement after unmaximization.
2014-04-28 16:11:10 -04:00
Jasper St. Pierre
23ae11043f
window-wayland: Don't enter the only-moving path for Wayland resizes
...
We'll be adding additional code here for "correct" moving soon, so
we need to make sure not to do it for Wayland resizes.
2014-04-28 16:11:09 -04:00
Jasper St. Pierre
78657dafca
window-wayland: Clean up a bit
2014-04-28 16:11:09 -04:00
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