Commit Graph

1343 Commits

Author SHA1 Message Date
Sinclair Yeh
2ada748289 Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.
v4:
Incorporated krh and anderco's comments.  Now adding newly allocated
buffer's dimensions to texture_damage

v3:
* Removed unnecessary parentheses
* Added check for switching from EGL image to SHM buffer
* Moved shader assignment out of IF condition

v2:
Fixed the wrong comparison

v1:
Depending on specific DRI driver implementation, glTexImage2D() with data
set to NULL may or may not re-allocate the texture buffer each time it is
called.  Unintended consequences happen if later glTexSubImage2D() is called
to only update a sub-region of the texture buffer.

I've explored moving glTexImage2D() from gl_renderer_attach() and simply
mark the texture dirty, but the current implemention seems cleaner because
I won't have to worry about calling ensure_textures() and re-assigning
gs->shader unnecessarily.
2013-06-07 00:19:13 -04:00
Daniel Stone
c228e23b05 configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS
AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar
macros to expose the largest extent of functionality supported by the
underlying system.  This is required since these macros are often
limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually
on some systems hide declarations which are not part of the X/Open spec.

Since this goes into config.h rather than the command line, ensure all
source is consistently including config.h before anything else,
including system libraries.  This doesn't need to be guarded by a
HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org
modular transition.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

[pq: rebased and converted more files]
2013-06-05 01:16:34 -04:00
Rob Bradford
5238b683e2 udev-seat: Use udev rules to support multiple seats
By labelling devices with ENV{WL_SEAT} in udev rules the devices will be
pulled into multiple weston seats.

As a result you can get multiple independent seats under the DRM and
fbdev backends.
2013-06-05 00:27:35 -04:00
Rob Bradford
b7682b6413 udev-seat: Separate the seat out to its own structure
Thie will allow us to instantiate multiple seats.
2013-06-05 00:27:30 -04:00
Rob Bradford
2387fde095 compositor-fbdev: Rename seat variable to seat_id to clarify purpose 2013-06-05 00:24:10 -04:00
Rob Bradford
f165f18439 compositor-fbdev: Remove unused fbdev_seat code
The fbdev compositor uses the commons seat handling code with the drm
compositor.
2013-06-05 00:23:59 -04:00
Rob Bradford
d355b80172 udev-seat: Make the udev_input structure an embedded structure
And as a result of this stop iterating through the compositor seat list
(of one item) and instead access the udev_input structure directly.

This enables a refactoring to pull out the weston_seat into a separate
structure permitting multiple seats.
2013-06-05 00:23:29 -04:00
Rob Bradford
d27b99d950 udev-seat: Rename udev_seat to udev_input
This is a pure rename of the structure, functions and local variables in
preparation of the separation of the seat from the other udev input
handling.
2013-06-05 00:20:02 -04:00
Rob Bradford
643641dfb7 compositor-drm: Rename seat variable to seat_id to clarify it's purpose
This change is a straight refactor that has no functional change.
2013-06-05 00:18:06 -04:00
Rob Bradford
e445ae69f2 input: Send the seat name if the client advertises verson 2 of wl_seat 2013-06-05 00:17:43 -04:00
Rob Bradford
9af5f9e0fe input: Add a seat name parameter to weston_seat_init 2013-06-05 00:17:38 -04:00
Ander Conselvan de Oliveira
722a2d523c compositor-drm: Force DPMS state to ON after drmModeSetCrtc()
The kernel is supposed to set this when drmModeSetCrtc() is called but
at least the i915 driver wouldn't do that in all cases. A fix for this
should be released with kernel 3.10, but we work around the issue in
older kernels by always forcing DPMS to ON when doing a mode set.

https://bugs.freedesktop.org/show_bug.cgi?id=64873
2013-06-05 00:01:35 -04:00
Ander Conselvan de Oliveira
a0a433a223 compositor-drm: Cache the DPMS property on drm_output
This avoids one drmModeGetConnector() call every time the DPMS mode is
set. That call can take hundreds of milliseconds due to DDC.
2013-06-05 00:01:30 -04:00
Eduardo Lima (Etrunko)
4b2c236845 weston.pc: Added libexecdir and pkglibexecdir variables
These can be used by external clients to check the installation path

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-04 00:14:04 -04:00
Rob Bradford
f9e9d0d434 udev-seat: Fail input setup only if no devices are found
Rather than failing if we cannot open any single device fail the input
setup if there are no input devices added.

https://bugs.freedesktop.org/show_bug.cgi?id=64506
2013-06-04 00:13:20 -04:00
Hardening
b60e46f6ba Handle mouse wheel
The RDP compositor was ignoring mouse wheel events, this patch adds
support for it.
2013-06-04 00:10:19 -04:00
U. Artie Eoff
3b64d6236c use _exit instead of exit if client fails to exec
exit() calls atexit() handlers and C++ destructors (e.g. a C++
weston module) which could destroy state that the main process
depends on (e.g. ioctl's, tmpfiles, sockets, etc...).  If an exec
fails, call _exit() instead of exit().

v2: prefer _exit over _Exit

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-06-04 00:07:10 -04:00
Alexander Larsson
b846a8d45e screenshooter: Scale damage by output scale in screen recorder
The damage region is in compositor coords, we need to scale it by
the output scale when using the damage to read output buffer data.
2013-05-29 10:22:15 -04:00
Alexander Larsson
97af792718 pixman-renderer: Fix read_pixels for screen recorder
The old code had an off-by-one error on the y coordinate
where it says height - (cur_y - y). And it does the vflipping of
the *destination* buffer, whereas what is really needed is to
vflip the whole source buffer. This only affects when you read
out part of the image, such as when using the screen recoder.

Also, instead of doing the flipping manually we just let pixman
handle it.
2013-05-29 10:22:01 -04:00
Alexander Larsson
5576546e3d screenshoter: Make recorder handle PIXMAN_x8r8g8b8
This is what the pixman renderer reports for the read format.
2013-05-29 10:21:58 -04:00
Alexander Larsson
690f718834 shell: Position DRIVER fullscreen surfaces at origin
When a window is fullscreened with DRIVER method and we succeeded
in changing mode we need to actually move the surface to the
origin of the output, or it won't be used for scanout.
2013-05-29 10:18:15 -04:00
Alexander Larsson
d622ed3fbf shell: Center window in fullscreen if needed
If modeset fails With DRIVER method, and always with FILL method
we want to center the window.
2013-05-28 17:22:04 -04:00
Alexander Larsson
f82b6cac5e shell: Always go to original mode when focused window not fullscreen
Right now we only switch mode on activating a fullscreened window.
This has several problems:

* Once you're in fullscreen its hard to switch to a non-fullscreened
  window with alt-tab as you stay in the small resolution.
* If you switch from a fullscreened window to a non-fullscreened
  window and the fullscreened window is destroyed we will not
  restore the original mode (since the window is not
  shell_surface_is_top_fullscreen()
* Its hard to reach a different output on the right with the mouse
  when the mode is smaller that the original, as there is a "gap"
  between the two outputs. So, if you alt-tab to another window
  you can not always reach it.

This is somewhat of a sledge hammer, as it means you can't e.g.
focus a non-fullscreen on one output and have a window fullscreened
on another output. However, trying to restore only the outputs
the new window is on is problematic:

* It may later change output
* We want to see all windows anyway during alt-tab
* Can't reach the other windows with the mouse anyway

So, this seems like an ok solution.
2013-05-28 17:22:01 -04:00
Alexander Larsson
355748e3b5 shell: Use buffer_scale as output scale on fullscreen DRIVER
It may happen that you e.g. fullscreen a 800x600 surface with
buffer_scale 1 (e.g. a 800x600 buffer) on an output that is
otherwise scale 2. In this case we want to temporarily set
the output scale to 1, as we're really scanning out of a
scale 1 buffer. This causes us to e.g. report the input
positions in the right place, etc.

When we restore the original mode we also restore the original
scale.

Note that the scale change is a purely compositor internal change,
to clients it still looks like the output is scale 2.
2013-05-28 17:18:56 -04:00
Alexander Larsson
e32c376776 compositor: Store original output scale
We want this so we can restore the original mode
with the original size (after having been fullscreen).
2013-05-28 16:22:40 -04:00
Alexander Larsson
0b13506ecf compositor: Store modes in physical units
We changed the protocol to always list modes in physical pixel
units (not scaled). And we removed the scaled mode flag. This
just updates the DRM and X11 compositors and the gl and pixman renderers
to handle this.
2013-05-28 16:22:26 -04:00
Alexander Larsson
83368817a7 compositor-x11: Set original mode after current
Otherwise we're pointing the original mode on some uninitialized
value.
2013-05-28 16:15:28 -04:00
Alexander Larsson
bcd18d9b09 input: Fix possible crash in clip_pointer_motion
It was erronously using output->current->height in one
place where it should use output->height. This may cause
it to create an invalid clipped coordinate in case of output
scaling or transform, because the next round "prev" would
end up NULL.
2013-05-28 16:14:34 -04:00
Hardening
6a4e8c62e7 Fix name clash in RDP compositor
This patch fixes some name clashes introduced by last patches.
2013-05-28 15:36:20 -04:00
Alexander Larsson
edddbd14ac Convert all scales to int32_t
The type changed in the protocol, so update weston for this.
2013-05-28 15:27:45 -04:00
Kristian Høgsberg
14e438c8a2 compositor: Parse config file in main(), only keep weston config object
Now that all backends and modules have been converted to the new
config parser API, we don't have to keep the fd around.
2013-05-26 21:48:14 -04:00
Kristian Høgsberg
115b0f729c cms-static: Don't crash on outputs with NULL name 2013-05-26 21:30:14 -04:00
Kristian Høgsberg
8f6fcbfc2e compositor-x11: Use new config file parser
With the iterator API we can now convert the X11 backend.
2013-05-26 21:21:28 -04:00
Hardening
b8f03aa20e Don't store FreeRDP file descriptors
Weston don't uses the file descriptors from FreeRDP, there's no need
to store them.
2013-05-26 20:11:13 -04:00
Kristian Høgsberg
fc10cc0c65 shell: Remove input panel debug fprintf 2013-05-23 21:47:37 -04:00
Kristian Høgsberg
00fd7b82f0 text-backend: Use new config parser 2013-05-23 21:45:51 -04:00
Kristian Høgsberg
673a889fd8 shell: Use new config parser 2013-05-23 21:42:04 -04:00
Kristian Høgsberg
a30989a47d compositor-drm: Convert to new config parser 2013-05-23 21:41:59 -04:00
Kristian Høgsberg
7bedae1d44 cms-static: Convert cms-static to use new config parser
Almost half of the logic here was about wrestling the silly config parser
API.
2013-05-23 21:41:50 -04:00
Kristian Høgsberg
6a047915c0 compositor: Use new config parser for keyboard options 2013-05-23 21:41:45 -04:00
Kristian Høgsberg
732747114a Add new config parser
The current config parser, parses the ini file and pulls out the values
specified by the struct config_section passed to parse_config_file() and
then throw the rest away.  This means that every place we want to get
info out of the ini file, we have to parse the whole thing again.  It's not
a big overhead, but it's also not a convenient API.

This patch adds a parser that parses the ini file to a data structure and
puts that in weston_compositor->config along with API to query comfig
keys from the data structure.  The old parser is still available, but
we'll transition to the new approach over the next few commits.
2013-05-23 21:25:42 -04:00
Kristian Høgsberg
7c60912cb9 compositor: Make backlight_current int32_t to avoid unsigned overflow
Backlight brightness was wrapping around when decrementing from 0.
2013-05-23 21:00:45 -04:00
Kristian Høgsberg
220819f7b9 compositor-drm: Log failure and which backlight sysfs file we're using 2013-05-23 21:00:45 -04:00
Pekka Paalanen
daaddc6032 compositor-x11: fix default output scale
Default output scale of 256 makes little sense. Actually this is a type
mismatch between wl_fixed and int, probably a leftover from when the
scale factor was proposed as a fixed point number.

Scale 256 probably causes the Window creation to fail, but that actually
leads to a segfault in Mesa libEGL later:

Program received signal SIGSEGV, Segmentation fault.
0  dri2_create_window_surface (drv=0x645060, disp=0x646610, conf=<optimized out>, window=<optimized out>, attrib_list=<optimized out>)
    at platform_x11.c:291

291	   surf->SwapInterval = 1;
Here 'surf' is NULL.

1  0x00007ffff76c0709 in eglCreateWindowSurface (dpy=0x646610, config=<optimized out>, window=58720261, attrib_list=0x0) at eglapi.c:534
2  0x0000000000421549 in gl_renderer_output_create (output=0x673ae0, window=58720261) at gl-renderer.c:1661
3  0x00007ffff41c456b in x11_compositor_create_output (c=0x6388b0, x=0, y=0, width=1024, height=640, fullscreen=0, no_input=0,
    configured_name=0x0, transform=0, scale=256) at compositor-x11.c:928
4  0x00007ffff41c5ca0 in x11_compositor_create (display=0x631950, fullscreen=0, no_input=0, use_pixman=0, argc=0x7fffffffda7c,
    argv=0x7fffffffdd18, config_fd=14) at compositor-x11.c:1596
5  0x00007ffff41c63db in backend_init (display=0x631950, argc=0x7fffffffda7c, argv=0x7fffffffdd18, config_fd=14) at compositor-x11.c:1746
6  0x000000000040fcb7 in main (argc=1, argv=0x7fffffffdd18) at compositor.c:3293

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Alexander Larsson <alexl@redhat.com>
2013-05-23 11:16:21 -04:00
Kristian Høgsberg
785e1f34c1 rdp: Update output initialization to new API 2013-05-22 21:54:05 -04:00
Hardening
fe36a13a8f rdp: Improve raw surfaces
This patch does miscellanous improvements with raw surfaces:
* some frames markers are sent to identify a single frame made of
multiple surface updates
* we send the dirty sub-rectangles instead of the full bouncing box
* the size of the fragmentation buffer is now honored, so that our big
surface updates don't look like a DoS
* the subtile and image flipping are done in one step (not requiring a
temporary tile)
* we don't care about the size of the dirty region and always use the
preferred codec for surface update
2013-05-22 21:54:00 -04:00
Hardening
c39118be7e rdp: Don't rely on Synchronize packet for first screen refresh
Last FreeRDP don't send Synchronize packets anymore, so send the
first screen refresh when we're "connected". The client cursor is
also disabled during this step.
2013-05-22 21:53:58 -04:00
Hardening
827358e0bd rdp: Fixed codec initialisations
This patch fixes NSC codec initialisation that was not done (an
erronous copy'n paste).
The remoteFx context must be resetted when we go through an activation
sequence
2013-05-22 21:53:55 -04:00
Hardening
7d79dcc56d rdp: Drop unneeded main_seat
With recent changes in shell.c the fake seat is not required to
start a compositor, this patch removes it.
2013-05-22 21:53:51 -04:00
Hardening
a1ce6cd1bc rdp: Fix compilation against FreeRDP and weston
The stream utils of FreeRDP have changed recently, this patch fixes
the compositor compilation against FreeRdp master.
The backend_init() prototype has changed too, this fixes it.
2013-05-22 21:53:46 -04:00
Pekka Paalanen
d0cbf18d83 screenshooter: print info to log
Print the recording info to Weston log, not stderr.

Also fix the frame counter.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:07:30 -04:00
Pekka Paalanen
79346ab3a5 shell: wait for desktop-shell init before fade in
On Raspberry Pi, weston-desktop-shell is so slow to start, that the
compositor has time to run the fade-in before the wallpaper is up. The
user launching Weston sees the screen flipping to black, the fbcon
fading in, and then the desktop popping up.

To fix this, wait for the weston-desktop-shell to draw
everything before starting the initial fade-in. A new request is
added to the private desktop-shell protocol to signal it. If a
desktop-shell client does not support the new request, the fade-in
happens already at bind time.

If weston-desktop-shell crashes, or does not send the 'desktop_ready'
request in 15 seconds, the compositor will fade in anyway. This should
avoid a blocked screen in case weston-desktop-shell malfunction.

shell_fade_startup() does not directly start the fade-in but schedules
an idle callback, so that the compositor can process all pending events
before starting the fade clock. Otherwise (on RPi) we risk skipping part
of the animation. Yes, it is a hack, that should have been done in
window.c and weston-desktop-shell instead.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:07:30 -04:00
Pekka Paalanen
17bd884bff rpi: remove weston_plane support
There is no need to support weston_plane anymore.
The max-planes option is removed as unused.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:07:30 -04:00
Pekka Paalanen
e31e053369 rpi: switch to rpi-renderer
Replace the GL renderer with the new rpi-renderer on the Raspberry Pi
backend. This makes Weston on rpi not use EGL or GL anymore, at all.

The weston_plane feature is disabled, since the rpi-renderer does the
same, but better.

Add a command line option to select the output transform. It is not a
weston.ini option for now, since the rpi backend does not read the
configuration file yet. Hopefully that will be done later with some
shared code.

Add the rpi options to 'weston --help' output.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:06:01 -04:00
Pekka Paalanen
d7265bc4ac rpi: add a Dispmanx renderer
Dispmanx is the prorietary display API on the Raspberry Pi, which
provides hardware compositing. Every visible surface is assigned a
Dispmanx element, and the hardware or firmware will do all compositing
onto screen. The API supports translation, scaling, flips, discrete
rotations in 90-degree steps, alpha channel on the surfaces, and
full-surface alpha on top.

Previously, Dispmanx capabilities were used via the weston_plane
mechanism, where surfaces were assigned to planes when possible, and
otherwise transparently falling back to GLESv2 compositing. Because we
have no way to use the same memory buffer as a GL texture and a Dispmanx
resource, we had to prepare for both. In the worst case, that means one GL
texture, and two (double-buffered case) Dispmanx resources, all the size
of a whole surface, for all surfaces. This was eating memory fast. To
make things worse (and less slow), the wl_shm buffer was kept around,
since it was copied to either a texture or a resource as needed. This
caused all clients to need two buffers. In a Dispmanx-only renderer, we
can drop the GL texture, and we can release wl_shm buffer immediately
after the first copy, so clients become effectively single-buffered. So
from the worst case of 5 buffers per surface, we go down to 3 or just
2 (single-buffered Dispmanx element, one wl_shm buffer in the client)
buffers per surface.

As this will replace the GL renderer on rpi, we cannot fall back to the
GLESv2 compositing anymore. We lose arbitrary surface rotation, but we
lose also the GL fallback, which caused glitches.

This patch depends on new RaspberryPi firmware. Older firmware may not
render ARGB surfaces correctly, solid color surfaces maybe cause a
performance hit, and the output may completely fail in case the firmware
does not fall back internal off-line compositing properly as needed.

This new rpi-renderer support surface translation and scaling, but not
rotation or transpose (not even in 90-deg steps). In theory, 90-deg step
surface rotation is possible to support. Output transformations are
supported, but flipped variants do not seem to work right.

As a detail, menus and other surfaces that are simply translated with
respect to another surface caused falling back to the GL renderer. The
rpi-renderer handles them directly.

This patch only adds the new renderer, but does not hook it up into use.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 17:05:45 -04:00
Pekka Paalanen
4fc5dd0099 compositor: add capability CAPTURE_YFLIP
Both GL and pixman renderer (pixman probably only because GL did?)
return the screen capture image as y-flipped, therefore Weston y-flips
it again. However, the future rpi-renderer can produce only right-way-up
(non-flipped) screen captures, and does not need an y-flip.

Add a capability flag for y-flip, which the rpi-renderer will not set,
to get screen captures the right way up.

The wcap recording code needs yet another temporary buffer for the
non-flipped case, since the WCAP format is flipped, and the code
normally overwrites the input image as it compresses it. This becomes
difficult, if the compressor is supposed to flip while processing.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 16:56:58 -04:00
Pekka Paalanen
7bb6510748 compositor: add capability flag for arbitrary surface rotation
The upcoming rpi-renderer cannot handle arbitrary rotations. Introduce
Weston capability bits, and add a bit for arbitrary rotation. GL and
Pixman renderers support it.

Shell or any other module must not produce surface transformations with
rotation, if the capability bit is not set. Do not register the surface
rotation binding in desktop shell, if arbitary rotation is not
supported.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 16:46:43 -04:00
Ander Conselvan de Oliveira
9bdfc48f09 weston-launch: Fix failure to exec weston due to initalized argv values
The array of arguments supplied to execv must be NULL terminated. If
unitialized values are used as pointers the exec call may fail with a
EFAULT error ("Bad address").

https://bugs.freedesktop.org/show_bug.cgi?id=64874
2013-05-22 16:39:36 -04:00
Alexander Larsson
d9a7bb75d0 compositor-drm: Support output scaling
If you specify e.g. scale=2 in an output section in weston.ini
we scale all modes by that factor.

We also correctly scale cursor positioning, but ATM there is no
scaling of the cursor sprite itself.
2013-05-22 16:19:59 -04:00
Alexander Larsson
80f9163ad6 compositor-x11: Only repaint the damaged region
Set a clip on the GC when painting the damaged region so that
we don't copy the entire shadow buffer each time.
2013-05-22 16:19:54 -04:00
Alexander Larsson
4ea9552d05 compositor: Support output/buffer scaling
If you specify e.g. scale=2 in weston.ini an output section for the
X11 backend we automatically upscale all normal surfaces by this
amount. Additionally we respect a buffer_scale set on the buffer to
mean that the buffer is already in a scaled form.

This works with both the gl and the pixman renderer. The non-X
backends compile and work, but don't support changing the output
scale (they do downscale as needed due to buffer_scale though).

This also sends the new "scale" and "done" events on wl_output,
making clients aware of the scale.
2013-05-22 16:19:42 -04:00
Alexander Larsson
1f206b4ce4 pixman-renderer: Fix up transform handling
Rather than storing the shadow_image in the untransformed space
and rotating on copy to hw_buffer we store both on the transformed
space. This means a copy between them is a straight copy, and that
apps supplying correctly transformed surface buffers need not
change them.

We also correctly handle all output transform including the previously
unhandled flipped ones, as well as client supplied buffer_transforms (which
were previously ignored).

We also simplify the actual rendering by just converting any damage
region to output coordinates and set it on a clip and composite
the whole buffer, letting pixman do the rectangle handling. This
means we always do all the transforms, including the surface positioning
as a pixman_image transform. This simplifies the code and sets us up
for handling scaling at a later stage.

The transform looks complicated, but in practice it ends up being
an integer translation almost always, so it will hit the pixman
fastpaths.
2013-05-22 16:19:36 -04:00
Kristian Høgsberg
d7ab5b8007 cms-static: Use the right wl_listener for the output hotplug listener 2013-05-22 14:20:42 -04:00
Rob Bradford
d33f2b065c weston-launch: Print explanation of why we failed to open the device 2013-05-20 16:55:12 -04:00
Rob Bradford
2f8d9aacfa shell: End grab if the grabbed shell surface has been destroyed
The shell_grab_start function sets up a destroy notification on the
shell surface such that when the shell surface is destroyed the pointer
on the grab to the shell surface is set to NULL.

We must therefore check whether the shell surface is NULL and end the
grab if it is.

https://bugs.freedesktop.org/show_bug.cgi?id=64689
2013-05-20 16:53:49 -04:00
Hardening
eb1e13044f Fix surface_pong when a seat doesn't have a pointer
This patch fixes a crash with the surface_pong when one of the
seats doesn't have a pointer. This was the case with the RDP compositor
that use a fake seat with no mouse or keyboard.
2013-05-17 16:30:39 -04:00
Quentin Glidic
ff3230952a weston-launch: Run weston in the user login shell
This patch brings back the user environment from the shell.
In the future, weston-launch could create the Wayland socket earlier, in
which case the user's shell could be used to run Wayland-specific tools
in the new Weston session.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-05-17 16:23:46 -04:00
Pekka Paalanen
86c8ca03b5 compositor: forbid sub-surface nesting loops
The only way to create a sub-surface loop by recursive nesting is to
make the main surface (which does not have a role) a sub-surface of any
of its sub-surfaces. All other cases should already be cought.

This change checks for that exact case, and sends a protocol error.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-17 16:22:18 -04:00
Pekka Paalanen
16abf6a4d4 protocol: set_desync should flush
wl_subsurface.set_desync should apply the cached wl_surface state.
Otherwise, the sub-surface may be stuck: a commit on the parent surface,
if desynchronized, will not commit the sub-surface because it is
desynchronized, too. A commit on the sub-surface may not happen, if it
is waiting for the frame callback from the previous commit.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-17 16:21:50 -04:00
Ander Conselvan de Oliveira
1ed73246ed gl-renderer: Compile shaders only when needed
Saves some start up time by not compiling specific shaders until they
are needed.
2013-05-17 11:52:25 -04:00
Richard Hughes
d561687ec8 cms-colord: Warn if reading or writing to the FD failed
This also fixes a compile warning when building the tarball.
2013-05-15 11:40:10 -04:00
Richard Hughes
2379a65c9f cms-colord: Fix build after the API change 'Honor XDG_CONFIG_DIRS' 2013-05-15 11:40:10 -04:00
Kristian Høgsberg
b9f1c5248b lock-surface: Set geometry width and height before centering
The subsurface patches changed the center_on_output() behavior a bit.
Instead of using the buffer width and height, it now looks at surface
geometry.  In lock_surface_configure() we haven't set up the geometry
when we call center_on_output() so the lock surface would never show
up.
2013-05-14 20:59:07 -04:00
Eduardo Lima (Etrunko)
2733700bb4 text: Respawn input method process if it exits
Just the same as it is done in shell.c, if the input method process exits
for any reason, we relaunch it automatically, as it is not possible to
launch a standalone application outside of the weston process.

In v2:
 - Proper error message when giving up.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-05-14 14:55:39 -04:00
Ossama Othman
a50e6e4c50 config-parser: Honor XDG_CONFIG_DIRS
This set of changes adds support for searching for a given config file
in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in
$XDG_CONFIG_HOME or ~/.config.  This allows packages to install custom
config files in /etc/xdg/weston, for example, thus allowing them to
avoid dealing with home directories.

To avoid a TOCTOU race the config file is actually open()ed during the
search.  Its file descriptor is returned and stored in the compositor
for later use when performing subsequent config file parses.

Signed-off-by: Ossama Othman <ossama.othman@intel.com>
2013-05-14 14:36:37 -04:00
Ander Conselvan de Oliveira
95eb3a2eb4 compositor-drm: Don't page flip before a mode is set
The function drm_output_start_repaint_loop() unconditionally issues a
page flip, even if the crtc for that output has not been enabled yet.
That causes the page flip to fail, and drm_output_repaint() is never
called.

Solve this by bypassing the initial page flip if the output needs a
mode set.

This has the caveat of affecting latency predictability for that first
frame and when a "driver" mode fullscreen surface causes a mode set.
However, on both cases the mode set would take an unpredictable amount
of time anyway.

https://bugs.freedesktop.org/show_bug.cgi?id=63812
https://bugs.freedesktop.org/show_bug.cgi?id=64183
2013-05-14 10:21:54 -04:00
Richard Hughes
be7c4dd2a0 Add a colord implementation of a CMS plugin for weston
This allows users to change the assigned display profile in GNOME (using
gnome-control-center) or KDE (using colord-kde) and also allows the profiling
tools to correctly inhibit the calibration state whilst measuring the native
screen response.
2013-05-14 10:15:39 -04:00
U. Artie Eoff
ec08f33482 move subsurface-server-protocol.h include out of compositor.h
The subsurface-server-protocol.h header should not be included
by any headers that are part of the SDK since it is not exported.
Otherwise, SDK consumers will break during compilation.

Move this include from compositor.h to compositor.c.

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

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-05-14 10:09:52 -04:00
Giulio Camuffo
b836664c42 shell: account for the subsurfaces when going fullscreen or maximizing
We must calculate the bounding box of the surface + subsurfaces set and use
that when maximizing the window or going fullscreen.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:35:33 -04:00
Giulio Camuffo
61da3fc948 shell: enable moving and resizing of a surface when clicking on a subsurface
[pq: changed to weston_surface_get_main_surface(), and used a temporary
variable to clean up the expressions.]

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:35:25 -04:00
Pekka Paalanen
01388e253e shell: keyboard focus and restacking fixes for sub-surfaces
The shell needs to redirect some actions to the parent surface, when
they originally target a sub-surface. This patch implements the
following:

- Move, resize, and rotate bindings always target the parent surface.

- Opacity (full-surface alpha) binding targets the parent surface. This
  is broken, because it should change the opacity of the whole compound
  window, which is difficult to implement in the renderer.

- click_to_activate_binding() needs to check the shell surface type from
  the main surface, because sub-surface would produce SHELL_SURFACE_NONE
  and prevent activation.

- Also activate() needs to check the type from the main surface, and
  restack the main surface. Keyboard focus is assigned to the original
  (sub-)surface.

- focus_state_surface_destroy() needs to handle sub-surfaces: only the
  main surface will be in a layer list. If the destroyed surface is
  indeed a sub-surface, activate the main surface next. This way a
  client that destroys a focused sub-surface still retains focus in the
  same window.

- The workspace_manager.move_surface request can accept also
  sub-surfaces, and it will move the corresponding main surface.

Changes in v2:
- do not special-case keyboard focus for sub-surfaces
- fix surface type checks for sub-surfaces in shell, fix restacking of
  sub-surfaces in shell, fix focus_state_surface_destroy()

Changes in v3:
- Renamed weston_surface_get_parent() to
  weston_surface_get_main_surface() to be more explicit that this is
  about sub-surfaces
- Fixed move_surface_to_workspace() to handle keyboard focus on a
  sub-surface.
- Used a temporary variable in several places to clarify code, instead
  of reassigning a variable.
- Fixed workspace_manager_move_surface() to deal with sub-surfaces.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:34:54 -04:00
Pekka Paalanen
e67858b9cf compositor: introduce sub-surfaces
Implement the basic protocol for sub-surfaces:
- expose wl_subcompositor global interface
- error checking on protocol calls
- associate a parent wl_surface to a sub-surface
- introduce the sub-surface role, which is exclusive
- an implementation of the wl_subsurface interface
- allow nesting of sub-surfaces
- proper surface transformation inheritance from parent to sub-surfaces
- two different modes of wl_surface.commit for sub-surfaces
- hook sub-surfaces up to repaint by modifying the repaint list code

Struct weston_subsurface is dynamically allocated. For sub-surfaces, it
is completely populated.

For parent surfaces, weston_subsurface acts only as a link for stacking
order purposes. The wl_resource is unused, parent_destroy_listener is
not registered, the transform is not linked, etc.

Sub-surfaces are not added directly into layers for display or input.
Instead, they are hooked up via the sub-surface list present in parent
weston_surface. This way sub-surfaces are inherently linked to the
parent surface, and cannot be displayed unless the parent is mapped,
too. This also eases restacking, as only the parent will be in a layer
list. Also, only the main surface should be subject to shell actions.

The surface list rebuilding in weston_output_repaint() is modified to
process sub-surface lists, if they are non-empty. The sub-surface list
always contains the parent, too, unless empty. The collection of
frame_callback_list is moved to a later loop, to streamline the surface
list rebuild functions.

Features still lacking are:
- full-surface alpha support for compound windows

Changes in v2:
- fix a bug in surface mapping: commit a sub-surface would cause the
  main surface to never be mapped.
- remove debug printfs
- detect attempt of making a surface its own parent
- always zero-alloc weston_subsurface
- apply wl_subsurface.set_position in commit, not immediately
- add weston_surface_to_subsurface()
- implement sub-surface commit modes parent-cached and independent
- implement wl_subcompositor.destroy and wl_subsurface.destroy

Changes in v3:
- rebased, and use the new transform inheritance code
- squashed the commit "add sub-surfaces to repaint list"
- fixed a buffer reference leak in commit_from_cache()
- Rewrite the sub-surface destructor code, and make it leave the
  wl_subsurface protocol object inert, if one destroys the corresponding
  wl_surface.
- replaced set_commit_mode with set_sync and set_desync
- allowed sub-surface nesting, and fixed repaint accordingly
- implemented nested sub-surface commit modes
- Made the sub-surface order changes from wl_subsurface.place_above and
  .place_below to be applied when the parent surface state is applied,
  instead of immediately. This conforms with the protocol specification
  now.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:32:51 -04:00
Pekka Paalanen
2396aec684 protocol: add sub-surfaces
Add protocol for sub-surfaces, wl_subcompositor as the global interface,
and wl_subsurface as the per-surface interface extension.

This patch is meant to be reverted, once sub-surfaces are moved into
Wayland core.

Changes in v2:

- Rewrite wl_subcompositor.get_subsurface description, and move mapping
  and commit details into wl_subsurface description. Check the wording
  in wl_subsurface.set_position description.

- Add wl_subsurface.set_commit_mode request, and document it, with the
  commit_mode enum. Add bad_value error code for wl_subsurface.

- Moved the protocol into Weston repository so we can land it upstream
  sooner for public exposure. It is to be moved into Wayland core later.

- Add destroy requests to both wl_subcompositor and wl_subsurface, and
  document them. Experience has showed, that interfaces should always
  have a destructor unless there is a good and future-proof reason to not
  have it.

Changes in v3:

- Specify, that wl_subsurface will become inert, if the corresponding
  wl_surface is destroyed, instead of requiring a certain destruction
  order.

- Replaced wl_subsurface.set_commit_mode with wl_subsurface.set_sync and
  wl_subsurface.set_desync. Parent-cached commit mode is now called
  synchronized, and independent mode is desynchronized. Removed
  commit_mode enum, and bad_value error.

- Added support for nested sub-surfaces.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:05:59 -04:00
Kristian Høgsberg
3d64a3e868 compositor-drm: Destroy sprites before destroying the outputs 2013-05-10 12:51:08 -04:00
Richard Hughes
b24e48e2ff Add initial color management framework code
ICC profiles can now be specified in weston.ini for each output, or a CMS
implementation can optionally loaded from a pluggable module.
2013-05-10 12:51:08 -04:00
Kristian Høgsberg
7b9195f9d6 compositor: Move gl-renderer vertex arrays into gl-renderer.c
They were still sitting in struct weston_compositor.
2013-05-08 22:38:05 -04:00
Kristian Høgsberg
659f2adacf compositor: Remove stale prototype
We got rid of this function.
2013-05-08 22:31:03 -04:00
Kristian Høgsberg
df54a60e67 input: Remove unused focus and key fields from keyboard and focus grabs 2013-05-08 22:11:11 -04:00
Kristian Høgsberg
6848c25677 input: Move surface picking into the pointer grab focus callback
Currently the core input code does surface picking before calling into
the focus callback of the current grab.  Not all grabs need to pick a
surface however, so we're doing work we don't have to in those cases.

For example, the shell move and resize grabs don't need to pick and the
default grab in implicit grab mode doesn't either.

With this change, the pointer grab mechanism is now very simple:
the focus callback is called whenever the pointer may have a new focus,
the motion callback is called whenever the pointer moves and
the button callback whenever a button is pressed or released.
2013-05-08 22:03:45 -04:00
Kristian Høgsberg
be6403ed5c input: Get rid of grab focus concept
This was another complication that we had to have to support the
split between libwayland-server and weston.  Different grabs want to send
events relative to different surfaces at different times.  The default
grab switches between sending coordinates relative to the 'current' surface,
that is the surface the pointer is currently above, or the 'clicked'
surface, in case of an implicit grab.

The grab focus was set by the grab implementation and the core input code
would transform the pointer position to surface relative coordinates for the
grab focus and store in grab->x/y.

Now we can just let the grab implementation transform the pointer
coordinates itself, leaving the implementation free to transform
according to whichever surface it wants.  Or not transform at all if
it doesn't need surface relative coordinates (like the shell move and resize
grabs).
2013-05-08 21:03:23 -04:00
Kristian Høgsberg
e122b7ba58 input: Remove 'current' and related fields from weston_pointer
The current surface field was used to track the surface the pointer was
currently over along with pointer position relative to that surface,
regardless of implicit or explicit grabs.  The main purpose was to restore
the default grab when another grab terminated.  We can now just repick in
that case and avoid keeping that state around, with the destroy listener
overhead that involves.

There was one other use case - we used to optimize out calls to
weston_pointer_set_focus() if the focus didn't actually change.  We can
still do that, but we have to do that in the default_grab_focus() handler
and compare against weston_pointer->focus instead.
2013-05-08 16:47:06 -04:00
Kristian Høgsberg
dba25868bc data-device: Verify that the client has an implicit grab when starting a drag
Make sure that the implicit is valid and still in effect as we start
the drag.  Fixes a long standing FIXME.
2013-05-08 15:58:49 -04:00
Kristian Høgsberg
5a9fb35c89 data-device: Eliminate two small helper functions
device_setup_new_drag_surface() and device_release_drag_surface() are both
now fairly small and only called from data_device_start_drag() and
data_device_end_grab() respectively.  Folding the two functions in where
they're called from simplifies the code flow a bit.
2013-05-08 15:58:49 -04:00
Kristian Høgsberg
c43aad1ab4 data-device: Rename generic weston_drag 'surface' field to 'icon' 2013-05-08 15:58:49 -04:00
Kristian Høgsberg
054c50a6de data-device: Move all drag-related fields out of weston_seat
We can now allocate a temporary weston_drag structure that we keep all
this drag-and-drop related state in.
2013-05-08 15:58:49 -04:00
Kristian Høgsberg
195b869f0e input: Move sprite fields into weston_pointer from weston_seat 2013-05-08 15:58:49 -04:00
Kristian Høgsberg
fe7aa90ed4 compositor: Adapt to wl_surface going away
struct weston_surface is now the only surface type we have (in core, shell.c
has shell_surface, of course).  A lot of code gets simpler and we never
have to try to guess whether an API takes a wl_surface or a weston_surface.
2013-05-08 09:54:37 -04:00
Kristian Høgsberg
a4036bbd23 input: Allocate pointer/keyboard/touch structs 2013-05-07 23:52:07 -04:00
Kristian Høgsberg
2bf876282f input: Eliminate weston_seat::has_pointer/keyboard/touch
We can just look at weston_seat::pointer/keyboard/touch now.
2013-05-07 23:40:26 -04:00
Kristian Høgsberg
aad8099c2f data-device: Update drag icon position from configure and motion handlers
We can now update the drag icon position directly from the configure
handler or the grab motion handler, and no longer need
weston_seat_update_drag_surface().
2013-05-07 22:57:15 -04:00
Kristian Høgsberg
415f30cc08 data-device: Map drag icon in configure handler
This how we usually do it, and we avoid 'polling' for mapping in
weston_seat_update_drag_surface().
2013-05-07 22:42:31 -04:00
Kristian Høgsberg
5f95557631 data-device: Setup and release drag surface and beginning and end of drag
Previously we just got the drag_icon signal and had to figure out what
changed.  Now we can directly setup or release the drag icon when the
drag starts and stops.
2013-05-07 21:06:38 -04:00
Kristian Høgsberg
40e44ab18d data-device: Fix dnd regression from weston_seat rewrite
We had a drag_surface in wl_seat and weston_seat which confused me during
the rewrite.
2013-05-07 20:50:26 -04:00
Kristian Høgsberg
624d8f2293 data-device: Don't emit a signal for drag icon changes
The signal used to be in libwayland-server and the listener in weston, but
now they're both in the same file, so lets stop using signal.
2013-05-07 20:46:04 -04:00
Kristian Høgsberg
7848bb687c input: Move drag handling to data-device.c 2013-05-07 11:18:46 -04:00
Kristian Høgsberg
8799d41b1e compositor: Move fan_debug to gl-renderer
With the debug binding infrastructure, we can do this all inside
gl-renderer.c.
2013-05-07 10:50:09 -04:00
Kristian Høgsberg
e314875d00 input: Merge wl_seat into weston_seat 2013-05-07 09:07:43 -04:00
Kristian Høgsberg
4912454ba4 input: Remove wl_seat destroy signal
We already have one on weston_seat.
2013-05-06 22:27:40 -04:00
Kristian Høgsberg
4a2a274350 input: Fold wl_seat init/release into weston_seat init/release 2013-05-06 22:24:50 -04:00
Kristian Høgsberg
e329f36533 input: Rename wl_touch to weston_touch
This is now a weston object.
2013-05-06 22:19:57 -04:00
Kristian Høgsberg
02bbabbd56 input: Rename wl_pointer to weston_pointer
This is now a weston object.
2013-05-06 22:15:05 -04:00
Kristian Høgsberg
a71e8b2e4d input: Rename weston_device_repick() to weston_seat_repick()
Old left-over misnaming.
2013-05-06 21:51:21 -04:00
Kristian Høgsberg
80fb82df3a input: Drop find_resource_for_client()
We can use find_resource_for_surface() instead now that it's all in the
same file.
2013-05-06 21:49:55 -04:00
Kristian Høgsberg
b5e26104ee move input code from compositor.c into input.c 2013-05-06 21:46:18 -04:00
Kristian Høgsberg
29139d4a45 fold wl_keyboard into weston_keyboard 2013-05-06 21:40:36 -04:00
Kristian Høgsberg
2158a889a1 Import input structs and helper functions from wayland 2013-05-06 21:40:32 -04:00
Jan Arne Petersen
cc75ec11ca text: Rename input_method to wl_input_method
Also rename input_method_context to wl_input_method_context,
input_panel to wl_input_panel and input_panel_surface to
wl_input_panel_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:18:46 -04:00
Jan Arne Petersen
70d942b4d7 text: Rename ::set_panel to ::set_overlay_panel
Also add documentation to input_panel_surface::set_overlay_panel.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:12:02 -04:00
Jan Arne Petersen
62ece76b1e text: Rename text_input to wl_text_input
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:06:27 -04:00
Jan Arne Petersen
00191c7c4a text: Fix serial handling
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:48 -04:00
Jan Arne Petersen
b41531a88e text: Only allow input-method started by weston to bind
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:48 -04:00
Jan Arne Petersen
7cd29e199a text: Add output argument to set_toplevel
Allow to specify an output for a toplevel  input panel surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:47 -04:00
Jan Arne Petersen
14da96bf81 text: Add support for panels following the cursor
Add input_panel_surface::set_panel to specify input panel surfaces which
are overlaying the application and are following the input cursor.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:47 -04:00
Jan Arne Petersen
78d00e45cc text: Rename text_model to text_input
Also rename text_model_factory to text_input_manager.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:35 -04:00
Jan Arne Petersen
7ef8effca5 text: Order requests and events in a nice way
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:14 -04:00
Jan Arne Petersen
fa3573852d text: rename text_model::commit to commit_state
Use ::commit_state as a request name to make clear what is commited.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:36 -04:00
Jan Arne Petersen
ece6b5af51 text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:21:18 -04:00
Kristian Høgsberg
f91871980e xwm: Reparent client windows into ARGB windows
We used to rely on an ugly hack where the xwayland server would always
report RGB X windows as having ARGB pixels, so that texturing from these
would also sample the undefined alpha.  We also relied on Xrender rendering
to RGB X windows to write the alpha channel correctly, so that when we
texture from the RGB X window as an ARGB surface we end up getting the
alpha written by Xrender.

That was obviously all broken.  We can instead reparent client windows into
ARGB frame windows.  That way we can render the decorations using a
ARGB render pictformat and sample back those alpha values in a well-defined
way.  We can also unbreak xwayland and let it report RGB pixel format for
RGB windows.  We still need the opaque region or the RGB-only client window
but that's OK.
2013-05-02 13:43:34 -04:00
Richard Hughes
afe690cbcf Move the optional output name property from drm_output to weston_output
In the future the CMS plugins will need to read the config file and setup a list
of hardcoded names to ICC profiles.
2013-05-02 09:53:20 -04:00
Chris Michael
eb2074a18b Fix not checking return value of drmIoctl function call to map dumb buffer
in drm_fb_create_dumb, the return value of the drmIoctl function call
to map the dumb buffer was never checked, thus the following "if
(ret)" check was invalid as it was checking the previous return value
from the above drmModeAddFB call.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-01 21:26:02 -04:00
Richard Hughes
ab74562335 Include config.h in compositor-drm.c 2013-05-01 21:14:16 -04:00
Richard Hughes
e7299962a9 Add a set_gamma vfunc on weston_output 2013-05-01 21:14:10 -04:00
Richard Hughes
59d5da79be Add a output_created_signal on weston_compositor 2013-05-01 21:13:16 -04:00
Richard Hughes
64ddde1e70 Add a destroy_signal on weston_output 2013-05-01 21:11:46 -04:00
Richard Hughes
2b2092adb4 Extract and parse the EDID when outputs are added
At the moment we're only extracting interesting strings. We have to be quite
careful parsing the EDID data, as vendors like to do insane things.

The original EDID parsing code was written by me for gnome-color-manager.
2013-05-01 13:55:42 -04:00
Philipp Brüschweiler
63e7be60b3 shell: clear popup grab interface on remove_popup_grab and popup_grab_end
Fixes a segfault. Steps to reproduce:

* start weston with the x11 backend
* open a terminal
* click on the icon in the top left corner, choose close
* close the x11 window containing weston
2013-04-15 21:13:34 -04:00
Hardening
4a3c150c96 Correctly handle extended RDP keycodes
The keycodes received by the FreeRDP server aren't evdev keycodes.
This patch adds the correct convertion to evdev keycodes. After the
patch all keys that are marked as extended in RDP packets become
functionnal (that's the case for the windows key).
Please note that this patch rely on some corrections that have been
pushed on the FreeRDP github tonight.
2013-04-11 16:11:11 -04:00
Jonas Ådahl
e5a1225bc4 Make backends always specify output repaint time
Most backends relies on gettimeofday(2) for output repaint timestamps
but this is not a requirement. Before this patch repaints coming from
idle_repaint() always used gettimeofday(2) for timestamps. For backends
not using that time source this could cause large jumps between
timestamps.

To fix this, timestamps needs to always come from the backend. This
means that the backend needs to always be responsible of starting the
repaint loop in case that the repaint cannot start immediately.

The drm backend implementation is from the patch by Ander Conselvan de
Oliveira found here:
http://lists.freedesktop.org/archives/wayland-devel/2013-February/007393.html

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-04-08 14:24:03 -04:00
Kristian Høgsberg
b76237e508 compositor-drm: Allow running without launcher if effective UID is 0
This lets us keep running weston as root or setuid root.
2013-04-04 21:36:20 -04:00
Rob Bradford
91ae483ab9 compositor: Use wl_pointer_set_current to cleanup after surface destruction
This API call handles setting the current surface on the wl_pointer and also
maintaining a destroy notification to monitor that surface for destruction.

This is part of the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=696946
2013-04-03 12:05:57 -04:00
Philipp Brüschweiler
e14560e381 compositor: add information about the fbdev backend to --help output 2013-04-01 21:45:00 -04:00
Hardening
a83409cbff RDP compositor take 6
This patch is the 6th version of the FreeRDP based compositor.
Changes from last version:
 * use pixman_image_get_stride() when appropriate
 * always realloc

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2013-04-01 20:50:54 -04:00
Philipp Brüschweiler
57edf7f49e compositor: add WESTON_COMPOSITOR_OFFSCREEN state
This state is used when the user switches the vt. It turns of rendering
and frame events, but doesn't set the DPMS state to off.

As a part of this change, also turn off the idle timer when entering
the SLEEPING or OFFSCREEN states, which fixes
https://bugs.freedesktop.org/show_bug.cgi?id=61910 (rpi backend
untested).
2013-03-29 14:05:27 -04:00
Giulio Camuffo
7fe01b18d8 sdk: be C++ friendly
This renames the weston_surface's private member to configure_private
and externs "C" the headers of the SDK.
2013-03-28 14:03:58 -04:00
Kristian Høgsberg
88817f869f compositor: Remove unused wl_pointer variable
Using move_pointer() in notify_pointer_focus() left the wl_pointer variable
unused.
2013-03-27 23:00:29 -04:00
Peter Maatman
e5b42e4466 Added handler for SIGABRT 2013-03-27 22:57:33 -04:00
Jonas Ådahl
848e2e670e evdev-touchpad: Disable tap FSM by default on touchpads with button pads
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-03-27 15:39:09 -04:00
Kristian Høgsberg
5006596a72 compositor-x11: Fix relative motion reporting for multiple outputs 2013-03-27 15:14:07 -04:00
Rob Bradford
c088e2c011 compositor: Support notifying with absolute position too
With evdev input devices that generate absolute positions we need to provide
an infrastructure in the compositor for supporting those.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61997
2013-03-27 14:42:28 -04:00
Rafal Mielniczuk
32069c09ea compositor-drm: ensure we run drm-backend using weston-launch
We do this by checking if launcher_sock != -1

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=60926
2013-03-27 13:46:01 -04:00