1
0
Fork 0
Commit graph

4175 commits

Author SHA1 Message Date
Jasper St. Pierre
fdd43fc2d9 backend-x11: Add KeyPress / KeyRelease to mask 2014-04-23 14:23:12 -04:00
Jasper St. Pierre
4cbf420b4b idle-monitor-xsync: Clean up includes
Conflicts:
	src/backends/x11/meta-idle-monitor-xsync.c
2014-04-23 13:27:11 -04:00
Jasper St. Pierre
fd373948d2 idle-monitor-xsync: Retrieve your xdisplay from the backend 2014-04-23 13:27:11 -04:00
Jasper St. Pierre
1dc8a7eca3 monitor: Remove handle_xevent as a generic method 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
861cfc23df x11: Make sure to handle RANDR events from the right connection 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
86368e7e07 backend: Add grab_device / ungrab_device
This makes sure that we take active grabs on the correct connection.
Passive grabs are still broken.
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
f42184ded8 display: Pull the grab cursor from the cursor tracker
This might look silly, but just wait...
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
af515732b0 display: Clean up set_grab_op_cursor 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
98a1573bee cursor: Save the original MetaCursor a cursor came from
So we can recreate it as a server-side cursor
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
1762436775 display: Remove the screen from set_grab_op_cursor 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
4fd017d23d display: Always grab the root window
This grab needs to move to the backend, where we won't be able to
discriminate between different windows
2014-04-23 12:15:12 -04:00
Jasper St. Pierre
2f6ce4783b display: Remove grab_xwindow from the public API 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
c6296aa17f cursor: Make load_cursor_on_server public 2014-04-23 12:15:12 -04:00
Jasper St. Pierre
b501ca5a24 cursor: Remove cursor tracker from API 2014-04-23 12:15:11 -04:00
Jasper St. Pierre
10ac86b950 backend: Clean up slightly 2014-04-23 12:15:11 -04:00
Jasper St. Pierre
def097359c cursor-renderer: Remove bogus assert 2014-04-23 10:24:26 -04:00
Jasper St. Pierre
6c743dad88 xrandr: Rewrite to be based on the X11 display connection 2014-04-23 10:24:26 -04:00
Jasper St. Pierre
274047c3f8 backend-native: Make sure to chain up to the parent post_init 2014-04-23 10:24:26 -04:00
Jason Ekstrand
e04e9aac39 Fix an uninitialized variable warning 2014-04-22 21:09:06 -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
5752079cbb launcher: Finish the rename
Not sure how I missed this one...
2014-04-22 18:25:22 -04:00
Jasper St. Pierre
7014dc5368 launcher: Rename methods a bit 2014-04-22 17:42:25 -04:00
Jasper St. Pierre
fdaeb0cf9c launcher: Fix indentation 2014-04-22 17:42:13 -04:00
Jasper St. Pierre
59415bf49f launcher: Unconditionally set the FD
We only open weston-launch if we're in the native backend,
so we don't need to check here.
2014-04-22 17:42:13 -04:00
Jasper St. Pierre
3c3b94921f launcher: Move activate_session abstraction into the launcher code
login1 has a separate ActivateSession request, so put it here so
that we don't have to modify any backend code.
2014-04-22 17:42:13 -04:00
Jasper St. Pierre
0d9fa24be4 launcher: Fix up includes 2014-04-22 17:42:13 -04:00
Jasper St. Pierre
9a98ec81d7 Rename meta-weston-launch to meta-launcher
We're going to replace this with a login1 implementation soon enough.
2014-04-22 17:41:48 -04:00
Jasper St. Pierre
d0142d6ab6 backend: Remove unnecessary include 2014-04-22 17:00:53 -04:00
Jasper St. Pierre
dd440e64da backends: Add a native cursor renderer 2014-04-22 16:56:02 -04:00
Jasper St. Pierre
a1ba480c8a cursor-renderer: Rewrite HW cursors to be cleaner 2014-04-22 16:56:02 -04:00
Jasper St. Pierre
93600d6166 cursor-renderer: Fix HW cursors
We need to make sure that we update the HW cursor if we disable
it for some reason.
2014-04-22 16:56:02 -04:00
Jasper St. Pierre
33f3ca7fba weston-launch: Go through the MetaBackend to force-update the cursor 2014-04-22 16:56:02 -04:00
Jasper St. Pierre
d27e267382 cursor: Retrieve the GBM device from the MetaBackend
Not the MetaCursorTracker.
2014-04-22 16:56:02 -04:00
Jasper St. Pierre
91784d87b6 Move the painting of the cursor on the stage out of the cursor renderer
This logic is now well-contained the stage. This is the start of us
moving to backend-specific cursor renderers.
2014-04-22 16:56:02 -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
e21677c782 cursor-renderer: Kill a warning
This can happen during early initialization. We should have a
better initialization plan.
2014-04-22 16:56:01 -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
eac6e9ed41 cursor-tracker: Improve symmetry between two paths 2014-04-22 16:56:01 -04:00
Jasper St. Pierre
4ea9a28eee cursor-renderer: Remove the MetaScreen
It's unused.
2014-04-22 16:56:01 -04:00
Jasper St. Pierre
ca11b88fcd screen: Remove no-op statement
This was at one time necessary to create the cursor tracker, but
now that it's global we don't need it anymore.
2014-04-22 16:56:01 -04:00
Jasper St. Pierre
20a0eb9809 Require the XSync and XShape extensions at build-time
It's been long enough. We can mandate support for these, at least
at build-time. The code doesn't actually compile without either
of these, so just consider that unsupported.
2014-04-22 14:17:09 -04:00
Jasper St. Pierre
d8dfe4e4ad display: Remove the RENDER extension requirement
Surprisingly, it's completely unused across all of the codebase.
2014-04-22 14:17:09 -04:00
Jasper St. Pierre
28666da6a1 backend-x11: Simplify XSync initialization handling a bit 2014-04-22 14:17:08 -04:00
Jasper St. Pierre
bb4896f1af plugin: Don't pass events to Clutter
We do this ourselves in the backend
2014-04-22 12:44:33 -04:00
Jasper St. Pierre
a17b86dfbe native: Install our pointer constrainment hook after Clutter initializes
Otherwise, the evdev device manager won't be around.
2014-04-22 12:44:33 -04:00
Jasper St. Pierre
d9450c46b9 cursor: Always use names for cursors
Rather than sometimes using names and sometimes using glyphs.
2014-04-22 12:44:33 -04:00
Jasper St. Pierre
e80c37f857 cursor: Don't require an xdisplay to load cursors on the client 2014-04-22 12:44:33 -04:00
Jasper St. Pierre
ef44cc5a53 cursor-tracker: Have one global cursor tracker
Now that we have a global MetaScreen, we can simply have a global
MetaCursorTracker as well. Keep the get_for_screen() API around for
compatibility, though.
2014-04-22 12:44:33 -04:00
Jasper St. Pierre
7c0d75e34f cursor: Don't access the cursor tracker from the screen directly
Go through the get_for_screen getter.
2014-04-22 12:44:30 -04:00
Jasper St. Pierre
ee812e3fe0 cursor-tracker: Split a simple method out 2014-04-22 12:44:27 -04:00
Jasper St. Pierre
52cf9104d9 window: Make the Move / Resize window menu items behave like the keybind
The Alt+F7 and Alt+F8 keybinds for moving and resizing windows allow you
to move and resize the window off the screen, so allow the same for the
menu items as well, since they're marked with the same accelerator.

https://bugzilla.gnome.org/show_bug.cgi?id=728617
2014-04-22 10:26:03 -04:00
Jasper St. Pierre
3d091e514d backend: Poll events from the host X11 server ourselves
I was accidentally pulling events from the Xwayland server under
nested for the idle monitor, which is wrong. Whoops.
2014-04-22 10:26:03 -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
75b5d15598 backend: Clarify comment 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
48dc544bef backends: Move most of the code from meta_backend_init into the subclasses 2014-04-21 20:25:21 -04:00
Jasper St. Pierre
31d744195d backends: Build MetaBackend subclasses for each backend 2014-04-21 20:25:21 -04:00
Jasper St. Pierre
00ea9bf14b backends: Start on an initial MetaBackend object
This isn't great so far -- all we did is put the idle monitors here
instead. We'll soon have separate backend subclasses for the two
backends.
2014-04-21 20:25:21 -04:00
Jasper St. Pierre
f3ee9be4cb idle-monitor: Use the XSync idle monitor under X11 nested 2014-04-21 20:25:20 -04:00
Jasper St. Pierre
2d6bcf3885 monitor-manager: Remove debugging META_DEBUG_MULTIMONITOR hook
It's outdated and incorrect: META_TYPE_MONITOR_MANAGER is now an
abstract class.
2014-04-21 20:25:20 -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
18770aaa63 cursor: Add an explicit getter for the gbm device
We want to move this to a new MetaCursorRenderer class.
2014-04-21 20:25:20 -04:00
Jasper St. Pierre
adf0d08585 events: Clean up a bit 2014-04-21 12:15:23 -04:00
Jasper St. Pierre
813206393a events: Handle move/resize grab ops as a first special case 2014-04-21 12:14:29 -04:00
Jasper St. Pierre
7c0a3dfeb8 window: Remove unused prototype 2014-04-21 12:14:29 -04:00
Jasper St. Pierre
cd4e6fcdee display: Remove unused grab variables 2014-04-20 13:06:41 -04:00
Jasper St. Pierre
2f9c601ae4 display: Clean up end_grab_op 2014-04-20 13:06:41 -04:00
Jasper St. Pierre
bec3db3068 events: Add explicit break
This doesn't particularly matter, since we fall through into a default
case that does nothing right below, but this matches the other paths
and it prevents us from falling into a trap if we add other event types
below.
2014-04-20 13:00:51 -04:00
Jasper St. Pierre
cef2745bc0 window: Properly end grab ops started from a keybind / menu
If we start a grab op from a keybind / menu, we'll handle the
ButtonPress and drop the grab then, never giving the window a chance
to handle what it needs to do before the grab is dropped.

This means that if you use Alt+F7 to move a window around, move it
to a side-tiling or maximization area, and then left-click, it will
just hang there in the sky.
2014-04-20 13:00:51 -04:00
Jasper St. Pierre
064ef09c99 window: Remove is_window_root
The entire point of it was to check whether the window was on the
right screen. Since we don't handle multiple screens anymore, we
don't need to check anything anymore.
2014-04-20 13:00:51 -04:00
Jasper St. Pierre
9ca0349c2b display: Use grab_op_is_moving_or_resizing 2014-04-20 13:00:51 -04:00
Jasper St. Pierre
f9305be450 display: Don't bother checking for mouse/keyboard separately
Just use our new is_moving_or_resizing method.
2014-04-20 12:03:25 -04:00
Jasper St. Pierre
6c9aa15814 display: Rename is_mouse_only to is_mouse 2014-04-20 12:03:24 -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
beca90a689 display: Expose meta_grab_op_is_mouse_only
And use it properly in some event handling code.
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
Adel Gadllah
a378faf495 stack-tracker: Fix unitialized variable 2014-04-20 16:02:48 +02: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