This reverts commit e7ad5cdcd2.
If you ask for setuid install and that fails you didn't get what you
asked for and we shouldn't just silently carry on. If installing weston
somewhere in your home directory and don't want the setuid bit set,
disable that at configure time.
When the compositor is in a repaint cycle, input is processed only once
per frame. However, a call to evdev_input_device_data() would handle at
most 8 events at time. When there was more than 8 events pending for a
given frame, input lag would occur. This was most visible with multi
touch input.
This patch changes the evdev_input_device_data() so that it will handle
all the events available in the fd. In order to do that, the fd is put
in non-blocking mode, so that it is possible to loop on read and stop
on EAGAIN instead of blocking.
Initializing pitch to 1 to avoid xxx/pitch errors
This won't influence the valid texture coordinate calculation, because
in that case buffer_attach will provide the correct value.
This makes the compositor and demo clients work on the current nouveau
nvfx driver. Obviously does not fix any clients that actually want a
depth buffer, but this does allow more people to at least try wayland.
mtdev library translates all multitouch based devices to the slotted evdev
protocol. It provides an uniform interface for Weston, which eases mt
implementation when dealing with a big variety of devices.
Weston on drm now directly depends on such library.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Commit f992b2fc removed the saved keyboard focus logic to fix a crash
when the saved surface is destroyed. However, setting keyboard focus to
the first surface on the list ends up trying to set the focus to the
cursor surface most of the time. The end result is a NULL keyboard
focus.
This patch restores the saved keyboard focus logic and fixes the crash
mentioned above using a destroy listener.
Without this change, weston would crash whenever a nil buffer was
passed to input_device_attach() if the cursor sprite was not mapped.
While at it, change the unmapping code to use weston_surface_unmap().
Function weston_load_image() was deleted in f02a649a but the wayland
backend was not adapted to the new interface. This probably went
unoticed because the prototype for the missing function was not deleted
from compositor.h so the backend would compile without warnings.
The configure default is to setuid root the weston compositor.
However, if installing as non-root (say, to your prefix in homedir),
the install fails anyway, even if you didn't need setuid to run weston
in your configuration.
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency. We can roll out own option parser and solve both problems
and save a few lines of code total.
Udev provides a convenient helper. Use it instead of working with the
property-list directly.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
If we have multiple video devices on the system (card0, card1), we should
ignore hotplug events for cards that we do not use. This avoids calling
update_outputs() if the event was not generated by our device so we avoid
refreshing the DRM information if it didn't change.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
When creating outputs in the drm compositor, if allocating crtcs
fails, then free the drm resources. Also, if the base output list is
empty, free drm resources
If map is called with a surface of type none it will call
weston_surface_assign_output, even though the surface will
not be mapped.
This change was lost with the changes for using wl_layers.
This can happen for instance running a toytoolkit application, launching
the popup menu and then clicking on a surface that does not belong to
the client that create the popup surface.
When a client with fullscreen surface displayed was aborted by Ctrl-C, the
black surface still be there. Destroy the black surface in
destroy_shell_surface().
When we're repainting, there's no point in polling for input events.
We just read input events once before each repaint and send out events
as needed. The input events come with an accurate timestamp, so this
doesn't affect the timing information and client should always look at
the event timestamps if they're trying to determine pointer motion
speed or double click speed. If we go idle (stop repainting) we add the
input devices back into the primary main loop and wait for the next event.
This avoids waking up the compositor separately (one or more times per
frame) to handle input events. We also avoid updating cursor position
and other compositor state after the client has rendered its new
frame, reducing lag between what the client renders and the pointer
position.
I was integrating patches on the 'layers' branch and had a fixed version of
the fullscreen patch there. My master branch had the fullscreen patch with
the resize bug, and when I pushed I meant to push the layers branch to master.
Conflicts:
src/shell.c
This can happen for instance if the client that started the drag
crashes. Weston would crash because of the invalid surface pointed by
device->drag_surface.
Fix this by reseting the drag surface to nil on a destroy listener.
The surface data structure is now a list of list of surfaces. The core
compositor defines the fade and cursor layer, and it's up to the shell to
provide more layers for the various surface types it implements.
We can now clip the surface bounding box against the previous frame
opaque clip, and then just union the result (visible damage) into
compositor->damage immediately.