Commit graph

3221 commits

Author SHA1 Message Date
Pier Luigi Fiorini
3dbbf321dd compositor.h: Don't include config.h
Public headers should not include config.h.
2013-08-26 15:33:52 -07:00
Kristian Høgsberg
dfe4acb4e2 Add more missing config.h #includes
Now that we use AC_SYS_LARGEFILE, we need to pull in config.h at least
whereever we use mmap().  Fixes at least the test-suite and simple-shm
on 32 bit systems.
2013-08-26 15:33:47 -07:00
Kristian Høgsberg
2471fac4d9 evdev: Initliaze device->link so we can wl_list_remove() without crashing
We were testing for wl_list_empty() on a { NULL, NULL } list (which
returns false) and then wl_list_remove()ing the device (which crashes).
2013-08-26 15:33:39 -07:00
Kristian Høgsberg
c2bc922348 xwm: Use window->x/y for override redirect surfaces
window->x/y is the coordinate of the top-level surface (whether that's
the frame window or an override-redirect window) and the wayland surface
should be placed there, without the t->margin offset.
2013-08-26 15:33:28 -07:00
Kristian Høgsberg
15df112a0e xwm: Fix transform listener
The coordinate transformation was broken (worked for first output where
output->x/y was 0,0, broke on all other outputs).  We can just use
surface->geometry.x/y directly.  We can't use the full transformation,
the best we can do is to move the X window to the geometry.x/y location.

Get rid of the static old_sx/sy hack as well.
2013-08-26 15:33:22 -07:00
Kristian Høgsberg
898e168bfd xwm: Fix configure notify handler
We only get configure notify for toplevel (frame or override-redirect window)
and those are the cases where we want to update window->x/y.  The way the
code worked, we'd exit immeidately in those cases and window->x/y would
not be updated.
2013-08-26 15:33:18 -07:00
Kristian Høgsberg
721f1f070b xwm: Set _NET_WM_CM_S0 instead of relying on the xwayland module to do it
Not sure why I made xwayland claim this selection, seem a little
awkward in retrospect.
2013-08-26 15:32:57 -07:00
Kristian Høgsberg
51175ca057 Bump version to 1.2.1 2013-08-22 12:17:00 -07:00
Kristian Høgsberg
fa9bfcc8de simple-egl: Handle missing EGL_EXT_buffer_age better
Including src/weston-egl-ext.h breaks distcheck, so lets just copy the
one EGL_EXT_buffer_age into simple-egl.c.
2013-08-22 12:17:00 -07:00
Maksim Melnikau
6d345d30ce add [xwayland] path weston.ini option
It sets the path to the xserver to run.

Signed-off-by: Maksim Melnikau <maxposedon@gmail.com>
2013-08-22 10:17:04 -07:00
Kristian Høgsberg
122a938507 compositor-drm: Zero out create_arg when creating dumb framebuffers
The create_arg struct has a flags member that we didn't properly set to 0.
2013-08-22 10:11:03 -07:00
Kristian Høgsberg
db8c5c8970 configure.ac: Add AC_SYS_LARGEFILE for mmap()ing dumb GEM buffers
We're mmap()ing buffers with 64 bit offsets coming from the
DRM_IOCTL_MODE_MAP_DUMB ioctl and need to make sure mmap accepts
those.
2013-08-21 15:47:17 -07:00
Hardening
61a13715bb set RDP output enabled by default (stable 1.2)
This patch fixes a bug found by Marek Romanowic: the RDP peer output must
be enabled by default, or we have to unfocus/focus the RDP client window to
have disable/enable output messages sent (and finally receive updates).
2013-08-21 11:36:27 -07:00
Daiki Ueno
e78734740e autotools: Don't use wayland-scanner.m4 2013-08-20 16:11:10 -07:00
Rusty Lynch
2629672f77 Add touch support for wl_shell_surface_move 2013-08-20 16:11:10 -07:00
Kristian Høgsberg
8ab98d5bfa nested: The wl_resouce is the buffer, not the wl_resource user data 2013-08-20 16:11:09 -07:00
Daniel Stone
55dada280c Add more missing config.h includes
config.h includes were missing in a few files, including input.c, the
lack of which caused the X11 backend to segfault instantly due to not
having an xkbcommon context.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2013-08-20 16:11:09 -07:00
Armin K
643f9bdfe0 autotools: Add configure summary 2013-08-20 16:11:09 -07:00
Kristian Høgsberg
afe2ab604c evdev: Ignore joystick devices
We don't handle them in any way now and having your steering wheel move
the cursor isn't useful.  Applications can still open evdev devices and
access them directly like they already do.
2013-08-20 16:11:09 -07:00
Rolf Morel
ce55406ec2 evdev: write EV_SYN input_event along with led events to device
Other clients of an evdev device need to have the events they receive
be separated, in moment in time, from other events by an EV_SYN/
SYN_REPORT. This is the responsibility of the client who writes events
into the stream.
2013-08-20 16:11:09 -07:00
Kristian Høgsberg
b8e7c9a670 nested: Use a void * to avoid warnings with EGL_WL_bind_wayland_display 2013-08-20 16:11:09 -07:00
Rob Bradford
cc4a187159 build: Allow more control over cairo use in the clients
Previously the configure script would silently disable the use of
accelerated cairo in the clients if cairo-gl could not be found (or
cairo-glesv2 if that was requested.) Conversely the use of cairo-gl
would be automatically enabled if it was found with no way to disable
that feature

This change adds --with-cairo which takes one of "image", "gl" or
"glesv2" (defaulting to "image"). If "gl" or "glesv2" is specified
cairo-egl is checked for as well as the specified renderer. If the check
fails then the configure process errors out.
2013-08-20 16:11:09 -07:00
Kristian Høgsberg
2d41d0d9a6 screenshooter: Add missing newline and use program_invocation_short_name 2013-08-20 16:11:09 -07:00
Kristian Høgsberg
ce5d935880 screenshooter: Only link to $(CLIENT_LIBS) not libtoytoolkit.la
This application doesn't use toytoolkit, so don't link to it.  We have to
add a copy of xmalloc, to link without toytoolkit.
2013-08-20 16:11:09 -07:00
Adrian Negreanu
80ab6e2aa8 fix compile error when EGL_BUFFER_AGE_EXT is missing
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
2013-08-20 16:11:09 -07:00
Adrian Negreanu
5325b38dc8 remove dependency on EGL_KHR_surfaceless_context
cairo_egl_device_create(), which is called next,
already checks if EGL_KHR_surfaceless_context is
available. If not, it fallbacks to pbuffer.

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
2013-08-20 16:11:09 -07:00
Rusty Lynch
df67fd060f desktop-shell: Add touch support to panel launcher icons 2013-08-20 16:11:08 -07:00
Rusty Lynch
1604b742a1 calibrator: Add touch support to calibrator 2013-08-20 16:11:08 -07:00
Rusty Lynch
76ae39d21e smoke: Add touch support to smoke example 2013-08-20 16:11:08 -07:00
Rusty Lynch
f1d502b136 window.c: Add touch handlers
This adds basic infrastructure for handling touch events in the toytoolkit.
2013-08-20 16:11:08 -07:00
Rusty Lynch
f26beb0607 input: Store touch position and time when we start an implicit touch grab 2013-08-20 16:11:08 -07:00
Rusty Lynch
36ced9b375 evdev: Use touch ID 0 when generating touch up event
device->mt.slot is uninitialized when we're not receiving the
evdev slot events.  Always use ID 0 as we do when we generate the
touch down and motion events.
2013-08-20 16:11:08 -07:00
Peter Hutterer
fd38e989b0 configure.ac: check for wayland scanner macro 2013-08-20 16:11:08 -07:00
Brian Lovin
0de49f7967 terminal.c: Check if fdopen() fails
If fdopen() fails we just close the fd and return, failing
the copy-and-paste.

Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
2013-08-20 16:11:08 -07:00
Peter Hutterer
9855960ac5 evdev: log when a device is used as touchpad 2013-08-20 16:11:08 -07:00
Peter Hutterer
ec03f0807a evdev: call evdev_device_destroy on failure
Avoid keeping keeping what needs to be freed in sync in multiple places,
make evdev_device_destroy do the right thing instead.
2013-08-20 16:11:08 -07:00
Peter Hutterer
52776d0d5a evdev: plug a potential memleak
For touchpads, device->dispatch is set up when exiting
evdev_handle_device() and a potential source for a memleak.
This can't actually happen at the moment, as evdev_handle_device() won't
fail for touchpads after setting up the dispatch but prevent this from
happening in the future.
2013-08-20 16:11:07 -07:00
Peter Hutterer
839c0b3d4a evdev: get the current slot value from the absinfo struct or mtdev
If touches are already present on the device, absinfo has the currently
active touch slot. There's a race condition where the slot may change before
we enable the fd and we thus miss out on the ABS_MT_SLOT event. It's still
slightly more correct than assuming whatever comes next is slot 0.
2013-08-20 16:11:07 -07:00
Peter Hutterer
765eee9cdf evdev: only use mtdev for Protocol A devices
For Protocol B devices, mtdev merely routes the events and is not needed.
For Protocol A devices, mtdev is needed, so fail for those devices now if we
mtdev fails.
2013-08-20 16:11:07 -07:00
Peter Hutterer
08b70c1c38 evdev: add comment why we're ignoring key value 2 2013-08-20 16:11:07 -07:00
Peter Hutterer
bb271b3755 evdev: prevent unterminated device name
The kernel copies up to sizeof(devname) bytes but doesn't null-terminate the
string if the device name exceeds the size of the supplied buffer.
2013-08-20 16:11:07 -07:00
Peter Hutterer
7112c49897 tty: fix typo in error message 2013-08-20 16:11:07 -07:00
Peter Hutterer
bd469da5b7 evdev: check for ABS_MT_POSITION_X/Y to determine mt devices
mtdev as currently used in weston is a noop. mtdev's purpose is to convert
Protocol A devices (without ABS_MT_SLOT) to Protocol B devices (slots).
For Protocol B devices mtdev merely routes the events, so checking for
slots and then using mtdev based on that adds no functionality.

Check for ABS_MT_POSITION_X/Y instead and use that to categorise a device
as MT device. mtdev will provide us with a slotted protocol for all devices.

https://bugs.freedesktop.org/show_bug.cgi?id=54428
2013-08-20 16:11:07 -07:00
Armin K
9eb7b13805 cms-colord: Don't redefine _GNU_SOURCE
warning: "_GNU_SOURCE" redefined [enabled by default]

See commit c228e23b
2013-08-20 16:11:07 -07:00
Kristian Høgsberg
7dcf12b847 gl-renderer: Only check for subimage when we have extension at compile time
If weston is compiled against a gl2ext.h that doesn't have the subimage
extension, but then run against a gles2 library that does provide it,
we end up disabling the glTexImage2D falback without having the subimage
code paths compiled in.
2013-08-20 16:11:07 -07:00
Kristian Høgsberg
07468dde8b Add workaround for broken GL_EXT_unpack_subimage tokens
Earlier versions of gl2ext.h defined the GL_EXT_unpack_subimage tokens
without the _EXT suffix.  That's been fixed and we're using the _EXT
tokens now, but just in case we're using an older, broken header, define
the _EXT tokens manually.
2013-08-20 16:11:07 -07:00
Kristian Høgsberg
a0ec31aa5e gl-renderer.c: Cast wl_resource to void * to avoid warning
The extension has been updated to take a wl_resource * now, but to avoid
warnings when compiling against older versions, just cast to void *.
2013-08-20 16:11:07 -07:00
Kristian Høgsberg
e7d3a309d6 gl-renderer: Test for GL_EXT_unpack_subimage not GL_UNPACK_ROW_LENGTH
It is defined by the mesa #include, which is just a copy of the official
Khronos header.  It's just defined in a different section than the
extension tokens.  In the mean time, the extension tokens were renamed
to add a _EXT suffix (eg GL_UNPACK_ROW_LENGTH -> GL_UNPACK_ROW_LENGTH_EXT)
and we silently failed to used the subimage extension.
2013-08-20 16:11:06 -07:00
Kristian Høgsberg
21f7c922a6 nested: Update to use weston-nested-client binary name 2013-08-20 16:11:06 -07:00
Stefan Schmidt
51595b9b22 clients: Fix typo in simple-touch and simple-shm.
listenter -> listener. Better fix it now before it spreads further.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
2013-08-20 16:11:06 -07:00