Commit Graph

3498 Commits

Author SHA1 Message Date
Kristian Høgsberg
edb6a3bd0a configure.ac: Only enable enable_simple_egl_clients if enable_egl is yes
This simplifies a few checks and makes sure we only build the
subsurfaces client if EGL is enabled.

https://bugs.freedesktop.org/show_bug.cgi?id=68727
2013-09-03 22:59:17 -07:00
Brian J Lovin
a8e627f4f2 keyboard: Add rudimentary touch support to keyboard.
At this time there is no way to have a key be activated when
touch_up is called, so all this patch does is activate they
key on touch_down.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2013-09-03 22:49:16 -07:00
Kristian Høgsberg
1f7ce6e3d5 configure.ac: Only build libva recorder if we found libva
The automatic detection failed to disable the build if it didn't
find libva.

https://bugs.freedesktop.org/show_bug.cgi?id=68908
2013-09-03 22:46:02 -07:00
Kristian Høgsberg
6399646a6b compositor-drm: Pass the wl_resource to gbm_bo_import()
Another silent regression from the wl_resource opaquify effort.  This was
causing our pageflip-to-client-buffer and sprites optimizations to
not kick in.
2013-09-03 22:32:52 -07:00
Kristian Høgsberg
ab6d6674b6 xwm: Unmap frame window when client window is unmapped
We used to destroy the frame window and reparent the client window to
wm_window.  That means that we lose the destroy_notify event when the
client window is destroyed later, since we don't select for
substructure_notify on wm_window.

Instead of destroying and reparenting, just unmap the frame window.
2013-09-03 20:57:18 -07:00
Kristian Høgsberg
318ea37782 xwm: Split creation of frame window out into its own function 2013-09-03 20:57:18 -07:00
Kristian Høgsberg
81cadc725c xwm: Set window->surface to NULL when surface goes away
Otherwise we may end up trying to remove the destroy listener if we
get the surface_destroy callback before the unmap_notify.
2013-09-03 20:57:18 -07:00
Kristian Høgsberg
1a7a57f0d9 xwm: Detect WM_NORMAL_HINTS fullscreen attempts 2013-09-03 20:57:11 -07:00
Kristian Høgsberg
59f44c184d xwm: Detect legacy fullscreen modes 2013-09-03 20:56:20 -07:00
Kristian Høgsberg
1b6fed41dd xwm: Update size when override redirect windows change size 2013-09-03 20:56:12 -07:00
Kristian Høgsberg
c940dcdb38 configure: Require wayland-server 1.2.90
Make sure we look for a recent enough version of wayland-server for
the new wl_seat release requests.
2013-08-30 15:00:01 -07:00
Rob Bradford
080311879e window: Use new wl_pointer/keyboard_release request
Since we bump the version we ask for from the compositor it is also
necessary to implement the new "name" event in the seat listener.
2013-08-30 14:58:04 -07:00
Kristian Høgsberg
69e25fc538 compositor: Implement release request for input interfaces
v2 (Rob Bradford): Update the version numbering for this change
2013-08-30 14:53:17 -07:00
Kristian Høgsberg
0eac34ab28 configure.ac: Auto-enable vaapi recorder, but allow overrides
If libva is available and recent, we'll enable the vaapi recorder feature,
but it can also be forced on or off by --enable/disable-vaapi-recorder.
2013-08-30 14:29:03 -07:00
Ander Conselvan de Oliveira
6aae4d39d5 compositor-drm: Add hardware accelerated capture of screen using libva
This patch adds a feature to the DRM backend that uses libva for
encoding the screen contents in H.264. Screen recording can be
activated by pressing mod-shift-space q. A file named capture.h264
will be created in the current directory, which can be muxed into
an MP4 file with gstreamer using

gst-launch filesrc location=capture.h264 ! h264parse ! mp4mux ! \
           filesink location=file.mp4

This is limitted to the DRM compositor in order to avoid a copy when
submitting the front buffer to libva. The code in vaapi-recorder.c
takes a dma_buf fd referencing it, does a colorspace conversion using
the video post processing pipeline and then uses that as input to the
encoder.

I'm sending this now so I get comments, but this is not ready for
prime time yet. I have a somewhat consistent GPU hang when using
i915 with SandyBridge. Sometimes a page flip never completes. If you
want to try this anyway and your system get stuck, you might need to
run the following:

  # echo 1 > /sys/kernel/debug/dri/0/i915_wedged

After that, alt-sysrq [rv] should work.

Once that's fixed it would also be good to make the parameters used by
the encoder more flexible. For now the QP parameter is hardcoded to 0
and we have only I and P frames (no B frames), which causes the
resulting files to be very large.
2013-08-30 13:44:40 -07:00
Quentin Glidic
9f43cb48aa autotools: Fix AC_PATH_PROG call
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-08-30 13:01:15 -07:00
Bryce W. Harrington
eec6aee490 .gitignore: Reflect recent client binary rename
Commit 77ab1721 renamed the client binaries; this change updates
.gitignore to follow this change.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-30 13:00:16 -07:00
Paul Winwood
b22bf57e21 window.c: Fix SIGSEGV in pointer_handle_motion
Move null pointer check and assignments before first window dereference.
2013-08-29 21:17:51 -07:00
Kristian Høgsberg
037bdc4c5d evdev: Don't parse config file again, use compositor->config 2013-08-29 13:49:35 -07:00
Kristian Høgsberg
e1b655df92 shell: Make sure we have seat->pointer and seat->touch before dereferencing
Either of these may not be available when we handle wl_shell_surface.move,
and we need to not crash when that's the case.

https://bugs.freedesktop.org/show_bug.cgi?id=68649
2013-08-28 23:17:09 -07:00
Kristian Høgsberg
73db924ad3 gl-renderer: Use GL_UNSIGNED_SHORT for index array type
GL_UNSIGNED_INT is only supported when GL_OES_element_index_uint is
available (mesa implements that extension).  We don't need 32-bit
indices, so just use GL_UNSIGNED_SHORT.
2013-08-28 23:05:31 -07:00
Stanislav Vorobiov
6346e501ac subsurfaces: fix rendering problem with cairo-glesv2
when using cairo-glesv2 subsurface rendering code
implicitly calls eglMakeCurrent(dpy, NULL, NULL, ctx)
(since EGL_KHR_surfaceless_context is used), thus,
triangle_frame_callback:eglSwapBuffers returns EGL_BAD_SURFACE
error for all invocations other that the first one
2013-08-28 22:31:33 -07:00
Samuel Iglesias Gonsalvez
f66f99d9db configure.ac: fix broken compilation when configure with --disable-egl option
Fix bug 67561: "configure with --disable-egl option breaks fbdev backend
compilation"

https://bugs.freedesktop.org/show_bug.cgi?id=67561

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
2013-08-28 22:21:11 -07:00
Kristian Høgsberg
c4a4c6b152 configure.ac: Bump configure.ac version to 1.2.90
We usually do this when we branch off the stable branch, better late than
never.
2013-08-28 22:16:10 -07:00
Kristian Høgsberg
6c7583de2a evdev: Don't transform device->abs.x/y in place
We don't always get both an X and an Y event in a SYN report, so we end
up transforming the coordinate we don't get twice.  For example, if we
only receive an ABS_X event, we transform the already transformed
device->abs.y again in transform_absolute() when applying the calibration.
2013-08-28 22:12:24 -07:00
Brian J Lovin
c4df4082c2 desktop-shell: Add support for touch unlock
Add support for unlocking on touch up using the
green button on the unlock dialog

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
2013-08-26 22:11:11 -07:00
Jason Ekstrand
a985da48a7 Add a --shell option to override the default desktop-shell
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-08-26 22:07:03 -07:00
Kristian Høgsberg
777874350b 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-26 15:30:42 -07:00
Pier Luigi Fiorini
403ea92c48 compositor.h: Don't include config.h
Public headers should not include config.h.
2013-08-26 15:22:42 -07:00
Kristian Høgsberg
c7d2c4c147 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 14:59:14 -07:00
Kristian Høgsberg
4e55d067ea 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 14:35:34 -07:00
Kristian Høgsberg
146f5ba466 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-22 16:30:21 -07:00
Kristian Høgsberg
e89a8b6ba1 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-22 16:23:35 -07:00
Kristian Høgsberg
122877d5e7 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-22 16:18:17 -07:00
Kristian Høgsberg
69981d9621 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-21 22:14:58 -07:00
Kristian Høgsberg
ac6104ea11 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-21 22:14:14 -07:00
Kristian Høgsberg
0b36d9780f terminal: Include config.h instead of defining _XOPEN_SOURCE 2013-08-21 22:13:17 -07:00
Kristian Høgsberg
7e105f9a91 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:44:57 -07:00
Kristian Høgsberg
a34e2f2adc data-device: Only bail out if we failed to allocate offer
It's valid to have a NULL data source (self-dnd) in which case we send
a NULL offer on enter.
2013-08-20 15:58:25 -07:00
Kristian Høgsberg
ab19f937c2 compositor: Only check buffer for NULL tried to allocate something
In particular, if we get a NULL buffer attach, it's ok for buffer to be NULL.
2013-08-20 11:30:54 -07:00
Daiki Ueno
3e9df07269 autotools: Don't use wayland-scanner.m4 2013-08-20 11:15:19 -07:00
Hardening
58bcc362a7 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-19 15:44:36 -07:00
Peng Wu
cfcc111070 Fixes CJK wide character display
By jumping two columns when wide character prints,
and draw wide background under wide character.
2013-08-19 15:37:19 -07:00
Rusty Lynch
1084da506e Add touch support for wl_shell_surface_move 2013-08-16 10:56:00 -07:00
Ander Conselvan de Oliveira
d224bb9218 nested: Fix skipping frames due to texture update without a context
Calls into cairo-gles may change the current context, so it was only by
chance that sometimes we had the proper one as current and updated the
correct texture in surface_attach().

In order to fix this, calling display_acquire_window_surface() before
binding the texture for setup is necessary. However this call has the
side effect of allocating a cairo surface for the window. At flush time,
the existence of this surface will cause an eglSwapBuffers(), even
if no rendering was done to it, leading to undefined contents on the
screen. This happens when the idle redraw task runs while there is a
pending frame callback.

Workaround this by moving the texture setup from surface_attach() to the
redraw handler, so that the cairo surface is only allocated when
redering is done.
2013-08-16 10:56:00 -07:00
Kristian Høgsberg
0d5fe3a231 nested: The wl_resouce is the buffer, not the wl_resource user data 2013-08-16 10:56:00 -07:00
Daniel Stone
8e7a8bdeea 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-16 10:56:00 -07:00
Kristian Høgsberg
69594ccf9c window: Use xzalloc() instead of silently failing to add output 2013-08-16 10:55:59 -07:00
Maksim Melnikau
92de144331 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-16 10:55:59 -07:00
Kristian Høgsberg
06b16c2a0b weston-info: Use xmalloc() in weston-info 2013-08-16 10:55:59 -07:00