Commit Graph

2151 Commits

Author SHA1 Message Date
Rob Bradford
0fb797596a compositor: Use uint32_t for the msecs value consistently 2012-08-02 11:06:44 -04:00
Pekka Paalanen
d9a8e16b7b compositor: remove OpenWFD backend
This backend has not seen even build testing for months, presumably does
not even compile, and is starting to hinder development a little.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Benjamin Franzke <benjaminfranzke@googlemail.com>
2012-08-01 10:09:53 -04:00
Kristian Høgsberg
649e1ce973 compositor: Don't allow setting a NULL cursor without pointer focus 2012-08-01 09:58:22 -04:00
Kristian Høgsberg
ae27737b28 window.c: Use pointer enter serial for setting cursor 2012-08-01 09:58:22 -04:00
Kristian Høgsberg
2e96d3c907 compositor: Check serial number ordering without overflowing 2012-08-01 09:58:17 -04:00
Scott Moreau
c50645c775 Properly free drm configured mode variables. 2012-08-01 00:41:28 -04:00
Kristian Høgsberg
bbe983923d shell: Make it possible to move and raise unresponsive surfaces 2012-08-01 00:20:21 -04:00
Kristian Høgsberg
9e31bff831 shell: Move surface move code back to just after the move grab functions
This chunk of code is what uses the move grab and used to come right
after it.  At some point it got split up, but move it back now.
2012-08-01 00:08:07 -04:00
Kristian Høgsberg
64eca8949b compositor: Fold the log prototypes into compositor.h and drop log.h
We're trying to keep the API exposed by the core compositor in compositor.h
2012-08-01 00:00:57 -04:00
Scott Moreau
8f37e0bc1e Add raw modeline support.
This allows specifying a modeline in the config for the 'mode' key
in the output section, such as one you would get from cvt.
2012-07-31 22:38:21 -04:00
Tiago Vignatti
4f238a590d configure: link image libs with libshared
This fix xwayland.so that was complaining about jpeg symbols from the
libshared.

Note that xwayland is not using the jpeg ones, but now that symbols are read
up front we need to link anyway.. or break apart that library.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-31 22:34:21 -04:00
Pekka Paalanen
76fc57e75c simple-touch: use proper damage in touch_paint()
Should reduce update overhead.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:27:23 -04:00
Pekka Paalanen
0768419393 simple-touch: fix off-by-one in position checks
Fix the off by one error in checking whether we can draw the marker
without exceeding buffer dimensions.

Fixes a segfault.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:27:23 -04:00
Pekka Paalanen
55b7cb24e0 simple-touch: more colors and thicker marks
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:27:23 -04:00
Pekka Paalanen
7e94a98e07 simple-touch: respond to ping protocol
Without this, it won't get any input anymore.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:27:23 -04:00
Pekka Paalanen
e288a0f415 window: warn on cursor load failure 2012-07-31 22:27:23 -04:00
Pekka Paalanen
56464253c0 compositor: rework touch focus
In the wl_seat conversion, struct wl_touch got fields for the focused
surface and the client resource for the input device being focused.
However, the conversion was incomplete: the old fields
weston_seat::touch_focus* we still used by the event dispatching code,
but the new code never set them. Therefore no touch events were ever
sent.

From weston_seat, remove the fields touch_focus, touch_focus_listener,
touch_focus_resource, and touch_focus_resource_listener. They are
replaced by the corresponding fields and listeners from struct
wl_touch.

While doing this, fix touch_set_focus().

If touch_set_focus() was called first with surface A, and then with
surface B, without being called with NULL in between, it would corrupt
the destroy_signal list. It was equivalent of calling wl_signal_add()
for different signal sources with the same listener without removing in
between.

Now, touch_set_focus() first removes focus and listeners, and then
attempts to assign focus if requested. If the target client has not
subscribed for touch events, the touch focus will now be NULL.
Before this patch, the touch focus was left to the previous surface.

NOTE: this patch depends on the patch "server: add lose_touch_focus()"
for Wayland.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:27:23 -04:00
Pekka Paalanen
2fc7cce9b1 evdev: query position ranges for MT, too
For a true multi-touch input device, the code ended up using
uninitialised fields of evdev_input_device::abs.

Fix it by querying the corresponding MT ranges.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:20:09 -04:00
Pekka Paalanen
27979b053f weston-launcher: use CLOEXEC on fallback path
If there is no weston-launcher available, launcher-util.c will fall back
to opening the given file itself. It that case it does not set the
close-on-exec flag, and will presumably leak the file descriptor to
children.

Use O_CLOEXEC on the fallback path, too.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:19:31 -04:00
Kristian Høgsberg
8ff691593c compositor-drm: Handle incomplete [output] sections without crashing 2012-07-31 22:18:28 -04:00
Kristian Høgsberg
e377822c64 shell: Give keyboard focus to top surface when current keyboard focus goes away 2012-07-31 22:18:02 -04:00
Kristian Høgsberg
2f5faff7f9 shell: Always track focus state per workspace
It's a little simpler than always creating and destroying it when we
switch workspace, and we'll need the focus_state soon.
2012-07-31 16:36:37 -04:00
Kristian Høgsberg
3df6384c3a compositor: Set WAYLAND_DISPLAY if we're given a --socket argument
This lets us run multiple compositors (nested or on different VTs).

https://bugs.freedesktop.org/show_bug.cgi?id=46629
2012-07-31 14:54:48 -04:00
Kristian Høgsberg
7b884bc0de compositor: Use a minimal restore handler for crash clean up
When we hit a segv, it's often the case that we might crash again in
the attempt to clean up.  Instead we introduce a minimal restore callback
in the backend abstraction, that shuts down as simply as possible.  Then
we can call that from the segv handler, and then to aid debugging, we
raise SIGTRAP in the segv handler.  This lets us run gdb on weston from
a different vt, and if we tell gdb

  (gdb) handle SIGSEGV nostop

gdb won't stop when the segv happens but let weston clean up and switch vt,
and then stop when SIGTRAP is raised.

It's also possible to just let gdb catch the segv, and then use sysrq+k
followed by manual vt switch to get back.
2012-07-31 14:32:01 -04:00
Kristian Høgsberg
023be102d7 window.c: Set input region after (potentially) adjusting the surface size
Regressed in dd263e546b, spotted by Scott Moreau <oreaus@gmail.com>
2012-07-31 11:59:12 -04:00
Kristian Høgsberg
c94de6450e shell: Remove unused shsurf->focus_state 2012-07-31 10:51:22 -04:00
Kristian Høgsberg
b8e0d0f5ac shell: Use the right destroy listener in focus_state_surface_destroy()
We were dereferencing the seat destroy listener.
2012-07-31 10:30:26 -04:00
Scott Moreau
8ab5d45399 Allow output configuration from config file.
Parse the config file for [output] sections and check for 'name'
and 'mode' keys. The key strings are compared to what is reported
by weston log. The 'mode' key string can be one of the following:

1) WIDTHxHEIGHT - one that is reported by weston log
2) off - Disables the output
3) preferred - Uses the preferred mode
4) current - Uses the mode currently driving the crtc
2012-07-30 21:56:13 -04:00
Wang Quanxian
acb805a356 compositor-drm: Handle unconnected connectors better
If a connector is not attached to a crtc, weston fails to bring it up.
Typically kms fbdev drives all crtc and connectors, but if kms hasn't been
initialzed and weston is the first to set a mode of if a monitor is
hotplugged, we just fail to bring it up.

(krh: reformatted and edited a bit from original patch)
2012-07-30 18:09:46 -04:00
Kristian Høgsberg
572c2ff59a compositor: Add --help option 2012-07-30 15:41:14 -04:00
Kristian Høgsberg
321e8b7fd3 gears: Exit on ESC 2012-07-30 15:40:57 -04:00
Pekka Paalanen
3361639b7b compositor: do clean-up on init failure
Simply exit(1)'ing the program will leave the VT unusable, since
DRM backend's clean-up does not run.

After a backend has been initialised, prefer jumping to clean-up instead
of directly exiting.

This fixes the case where 'weston-launch -- -i 5' would leave the
console unusable.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-30 12:42:31 -04:00
Ander Conselvan de Oliveira
69f9840bed simple-egl: Add keyboard fullscreen toggle
Make simple-egl toggle the fullscreen state whenever the key F11 is
pressed. A sync callback is used to stop drawing while the surface has
not received the configure event, to prevent a buffer with the windowed
size to be attached to the surface after the set_fullscreen request.
2012-07-27 16:11:40 -04:00
Kristian Høgsberg
2995c517c5 gears: Keep gears inside screen in fullscreen mode 2012-07-26 23:53:05 -04:00
Kristian Høgsberg
148ef0124f compositor-drm: Don't leak output->name 2012-07-26 23:04:37 -04:00
Kristian Høgsberg
9ca38464cb compositor-drm: Look through all crtc/encoder combinations
We used to only check the first possible encoder, now we go through all
possible encoders and look through all possible crtcs for each encoder.
2012-07-26 22:44:55 -04:00
Olivier Blin
7679d9a62e gears: add a warning about refresh rate limitation 2012-07-26 22:03:41 -04:00
Olivier Blin
a1d0cf5d69 gears: show FPS count (as in glxgears from mesa/demos) 2012-07-26 22:03:21 -04:00
Kristian Høgsberg
2f9ed71a8f compositor-drm: Assign unique output names like xrandr does 2012-07-26 17:57:15 -04:00
Kristian Høgsberg
1acd9f82f8 compositor: Load modules with RTLD_NOW so we get missing symbols up front
Otherwise we have no way to clean up when we hit something undefined.
2012-07-26 11:39:26 -04:00
Kristian Høgsberg
4fc1535c0a window: Handle Alt-F4 to close windows 2012-07-25 16:35:28 -04:00
Andre Heider
82b4c1bc6b window.c: Remove xkb leftovers 2012-07-25 16:24:49 -04:00
Olivier Blin
fa820efaf0 gears: add fullscreen support 2012-07-25 16:21:13 -04:00
Damien Lespiau
ea40bf88bc tests: Use pkg-config to find setbacklight CFLAGS and libs
setbacklight depends on udev and drm, one cannot just add the -l flags
if you want to support unusual install paths.
2012-07-25 10:40:11 -04:00
Kristian Høgsberg
e302b3ef77 Bump version to 0.95.0 2012-07-24 16:01:29 -04:00
Kristian Høgsberg
d1936b9e2b desktop-shell: Break command lines into env vars, executable and arguments
We now support specifying environment variables and arguments in launchers
by saying

  path=GDK_BACKEND=wayland gnome-terminal --full-screen

for example.

https://bugs.freedesktop.org/show_bug.cgi?id=47920
2012-07-23 22:59:33 -04:00
Kristian Høgsberg
df0faf7983 image: Add fullscreen support 2012-07-23 22:00:21 -04:00
Kristian Høgsberg
67ace20f8e window.c: Add fullscreen handler to keep fullscreen state consistent 2012-07-23 21:56:31 -04:00
Kristian Høgsberg
0fd49aa886 dnd: Clip flowers to window content area
https://bugs.freedesktop.org/show_bug.cgi?id=52420
2012-07-23 21:32:46 -04:00
Kristian Høgsberg
72b0f8f2ec Update src/weston-egl-ext.h 2012-07-23 20:54:42 -04:00