Kristian Høgsberg [Wed, 16 Oct 2013 18:38:24 +0000 (11:38 -0700)]
shell: Add a new weston.ini to control the startup animation
The new key startup-animation in the [shell] section lets you
control the startup animation. Default is fade, but with this patch
we can also do none, which just show the desktop as fast as possible.
Kristian Høgsberg [Wed, 16 Oct 2013 18:10:12 +0000 (11:10 -0700)]
compositor: Stop the repaint loop if the compositor went to sleep
We check the state when we schedule a repaint, but we will still repaint
in weston_output_finish_frame() if a repaint is needed. Now we check
whether we went to sleep while waiting for the page flip and stop repainting
in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=65802
Kristian Høgsberg [Wed, 16 Oct 2013 05:03:31 +0000 (22:03 -0700)]
simple-egl: Add support for using a 16 bpp EGLConfig
David Herrmann [Tue, 15 Oct 2013 12:29:57 +0000 (14:29 +0200)]
fbdev: open launcher only once
We currently call launcher_connect() twice, which is redundant and
amazingly works (ugh?). Fix this and connect only once to the launcher.
David Herrmann [Tue, 15 Oct 2013 12:29:56 +0000 (14:29 +0200)]
evdev: release devices on read() error
If read() fails without EAGAIN/EINTR, the device is very likely dead.
However, we must not remove the device as it might be muted/revoked. So we
simply remove the event-source to avoid polling the device and simply wait
for the udev-remove signal now.
Note that we cannot call evdev_device_destroy() as the caller created the
FD and might need custom code to close it (like weston_launcher_close()).
Kristian Høgsberg [Mon, 14 Oct 2013 22:46:13 +0000 (15:46 -0700)]
evdev: Clear touch capability if we see a mouse-type button
If an input device has BTN_LEFT (typically) it's not a touch screen but
a touch pad.
Kristian Høgsberg [Mon, 14 Oct 2013 22:32:08 +0000 (15:32 -0700)]
evdev: Only init a pointer if the evdev device has a button
We used to test for abs | rel | button, which inits a pointer device for
a device with just rel or abs capabilities. We now make sure we have either
rel or abs as well as button.
Kristian Høgsberg [Mon, 14 Oct 2013 22:28:01 +0000 (15:28 -0700)]
evdev: Stop looking for pointer buttons when we get to BTN_JOYSTICK
We don't want to mark a touchscreen as a button device just because it
exposes the BTN_TOUCH and BTN_TOOL buttons.
Ander Conselvan de Oliveira [Mon, 14 Oct 2013 12:57:11 +0000 (15:57 +0300)]
gl-renderer: Build as a loadable module
The time spent loading EGL and GLES libraries from disk can be a
considerable hit in some embedded use cases. If Weston is compiled
with EGL support, the binary will depend on those libraries, even if
a software renderer is in use.
This patch splits the GL renderer into a separate loadable module,
and moves the dependency on EGL and GLES to it. The backends still
need the EGL headers for the native types and EGLint. The function
load_module() is renamed to weston_load_module() and exported, so
that it can be used by the backends.
The gl renderer interface is changed so that there is only one symbol
that needs to be dlsym()'d. This symbol contains pointers to all the
functions and data necessary to interact with the renderer. As a side
effect, this change simplifies gl-renderer.h a great deal.
Ander Conselvan de Oliveira [Mon, 14 Oct 2013 12:57:10 +0000 (15:57 +0300)]
build: Add dependency between libdrm and compositor for drm backend
The compositor uses libdrm in launcher-util.c if the drm backend is
built, but there was no explicit requirement in the build. egl brings
libdrm implicity so the build doesn't fail.
This patch adds an explicit dependency between the compositor and
libdrm if the drm backend is built, so that changes to the compositor
modules don't cause build failures.
Kristian Høgsberg [Mon, 14 Oct 2013 20:59:53 +0000 (13:59 -0700)]
launcher: Drop unecessary checks for drm_fd == -1
We never get into this case, and if we do, we just want to pass the invalid
fd through to the underlying ioctl and get the error that way."
Kristian Høgsberg [Mon, 14 Oct 2013 20:57:44 +0000 (13:57 -0700)]
launcher: Fix reverted sense of drm_check_master() wrapper
Also rename to drm_is_master() to make it clearer what we're checking.
https://bugs.freedesktop.org/show_bug.cgi?id=70459
Neil Roberts [Thu, 3 Oct 2013 15:43:07 +0000 (16:43 +0100)]
Don't remove the touch grab until the last touch point is removed
Previously if you move a window around and temporarily add a second
finger then it will cancel the grab even though the original finger is
still held on the screen. It seems more robust to avoid cancelling the
grab until all fingers have been removed.
Neil Roberts [Thu, 3 Oct 2013 15:43:06 +0000 (16:43 +0100)]
Only update the touch grab position for the first finger
Previously if you add a second finger while moving a window with a
touch grab then the position will keep jumping between the position of
each finger as you move them around. This patch changes it so that it
keeps track of the first touch id that starts the grab and only
updates the grab position when that finger moves.
Neil Roberts [Thu, 3 Oct 2013 15:43:05 +0000 (16:43 +0100)]
Add a touch move binding
When holding the compositor super key the touch events can now be used
to move a window.
Neil Roberts [Thu, 3 Oct 2013 15:43:04 +0000 (16:43 +0100)]
Add a touch binding to activate a surface
Adds a new binding type for touch events via the new function
weston_compositor_add_touch_binding. The binding can only be added for
a touch down with the first finger. The shell now uses this to install
a binding to activate the current surface.
Kristian Høgsberg [Mon, 14 Oct 2013 05:11:07 +0000 (22:11 -0700)]
xwm: Fall back to xcb_kill_client() if window does support WM_DELETE_WINDOW
Jason Ekstrand [Mon, 14 Oct 2013 00:08:41 +0000 (19:08 -0500)]
xwayland: Use decoration frame from cairo-util
In particular, this gives us a close button on xwayland windows.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 14 Oct 2013 00:08:40 +0000 (19:08 -0500)]
Use cairo-util frame in tinytoolkit
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 14 Oct 2013 00:08:39 +0000 (19:08 -0500)]
Add decoration frame support to cairo-util
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 14 Oct 2013 00:08:38 +0000 (19:08 -0500)]
Rename frame_create and frame_set_child_size with a window_ prefix
This is to avoid a collision with an actual frame structure.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Kristian Høgsberg [Fri, 11 Oct 2013 23:48:19 +0000 (16:48 -0700)]
xwm: Redirect root window subwindows
xwayland no longer does this for us, we have to request it now
Kristian Høgsberg [Fri, 11 Oct 2013 22:25:42 +0000 (15:25 -0700)]
fbdev: Fix compilation without EGL
We have to duplicate #defines and typedefs for the EGL types and constants
we use in gl-renderer.h so we can compile the fbdev backend without EGL.
https://bugs.freedesktop.org/show_bug.cgi?id=70392
Alexandru DAMIAN [Wed, 2 Oct 2013 16:51:05 +0000 (17:51 +0100)]
compositor-drm: fix EGL format type
EGLInt is not always uint32_t so we need
to make sure we use the right int size for the format.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Stefan Schmidt [Thu, 10 Oct 2013 13:28:30 +0000 (14:28 +0100)]
clients: Update .gitignore for weston-multi-resource
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Stefan Schmidt [Thu, 10 Oct 2013 13:28:29 +0000 (14:28 +0100)]
xwayland: Remove unused call weston_wm_handle_configure_notify.
We get the child position but never use this information here. Just remove it.
Spotted by Christopher Michael.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Xiong Zhang [Fri, 11 Oct 2013 06:43:07 +0000 (14:43 +0800)]
compositor-drm: Avoid output_destroy happened before page_flip event
Currently there is no guarentee that output remove event always happend after
page_flip event on the same output. So if the following situation occur:
first: unplug a output
second: output remove event arrive, output_destrory called adn free output
third: page_flip event arrive on the destroyed output
the segment fault will happpen in page_flip_handler().
This patch add a variable drm_compositor->destroy_pending, if page flip
event is pending when output remove event arrive, output_destroy will be
delayed until page flip finished.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Kristian Høgsberg [Fri, 11 Oct 2013 02:21:05 +0000 (19:21 -0700)]
multi-resource: Don't include non-existing xmalloc.h
It existed on my local disk, of course. Just copy over xzmalloc().
Tomeu Vizoso [Wed, 9 Oct 2013 09:30:57 +0000 (11:30 +0200)]
launcher: Wrap drmGetMagic and drmAuthMagic so we can build without libdrm
Tomeu Vizoso [Wed, 9 Oct 2013 09:29:45 +0000 (11:29 +0200)]
rpi: Remove redundant cast
Kristian Høgsberg [Wed, 9 Oct 2013 21:23:00 +0000 (14:23 -0700)]
weston-test-client-helper: Use wl_fixed_to_double() when printing axis value
Kristian Høgsberg [Wed, 9 Oct 2013 21:01:23 +0000 (14:01 -0700)]
weston-test-client-helper.c: Assert on failed allocations
Kristian Høgsberg [Wed, 9 Oct 2013 20:48:09 +0000 (13:48 -0700)]
vaapi-recorder: Don't leak fd on thread error path
If we successfully open the file but fail to create the thread we
leak the fd.
Kristian Høgsberg [Wed, 9 Oct 2013 20:37:43 +0000 (13:37 -0700)]
tests: Assert surface creation succeeds
Kristian Høgsberg [Wed, 9 Oct 2013 20:34:35 +0000 (13:34 -0700)]
nested: Cast away warnings for differing arguments to eglQueryWaylandBufferWL
Kristian Høgsberg [Wed, 9 Oct 2013 20:30:58 +0000 (13:30 -0700)]
nested: Free client struct on launch_client error paths
Kristian Høgsberg [Wed, 9 Oct 2013 20:25:58 +0000 (13:25 -0700)]
nested-client: Exit if we fail to create the nested client struct
Kristian Høgsberg [Wed, 9 Oct 2013 20:09:51 +0000 (13:09 -0700)]
multi-resource: Use xzmalloc() instead of malloc+memset and calloc
Kristian Høgsberg [Wed, 9 Oct 2013 20:10:42 +0000 (13:10 -0700)]
launcher: Remove left-over debug logging
Kristian Høgsberg [Wed, 9 Oct 2013 20:05:55 +0000 (13:05 -0700)]
tablet-shell: Avoid leaking icon or path strings from invalid launcher section
Kristian Høgsberg [Wed, 9 Oct 2013 20:02:04 +0000 (13:02 -0700)]
window.c: Free cursor theme name once we're done with it
Kristian Høgsberg [Wed, 9 Oct 2013 18:25:14 +0000 (11:25 -0700)]
weston-launch: Only store drm fd if we successfully opened and stat'ed it
Kristian Høgsberg [Wed, 9 Oct 2013 18:19:11 +0000 (11:19 -0700)]
launcher: Don't leak tty file descriptor on error
Kristian Høgsberg [Wed, 9 Oct 2013 18:03:39 +0000 (11:03 -0700)]
launcher: Don't leak tty file descriptor on launcher destroy
Kristian Høgsberg [Wed, 9 Oct 2013 16:59:06 +0000 (09:59 -0700)]
compositor-fbdev: Fix a fd leak in the fbdev backend
fbdev_frame_buffer_map() closes the fb fd, so we have to close it
manually in case we're using the hybris renderer (ie !pixman).
Kristian Høgsberg [Wed, 9 Oct 2013 23:20:50 +0000 (16:20 -0700)]
configure.ac: Bump version to 1.3
Kristian Høgsberg [Wed, 9 Oct 2013 22:17:01 +0000 (15:17 -0700)]
Revert "Resize the shell when the mode is switched"
This breaks panel resizing as it doesn't account for output rotation.
https://bugs.freedesktop.org/show_bug.cgi?id=70249
This reverts commit
a356f7b1ef08fd9c2ad69cada89d68841e71a6bb.
Kristian Høgsberg [Wed, 9 Oct 2013 17:54:03 +0000 (10:54 -0700)]
input: Don't send modifiers if client doesn't have a pointer resource
This fixes an uninitialized serial error, were we could send out the
modifier event even if the client didn't have a pointer resource. We
send out the modifier event to let clients know the modifer mask when
they receive a pointer button event. Thus, if the client doesn't have
a pointer we don't need to send the modifier event.
Additionally we would send out the modifier event with an
uninitialized serial number.
Finally, this commit restores the order of sending the modifier event
before the enter, like it used to be. Not likely to be an issue,
since the client will always receive the modifier event before any
button event, but it's a little nicer to give the client the modifier
events before it receives any pointer events.
Tomeu Vizoso [Mon, 7 Oct 2013 09:02:20 +0000 (11:02 +0200)]
rpi: Add support for EGL buffers
The EGL implementation on the RPi allocates a front and a back
DispmanX resources for each EGLSurface, which we composite along
the others.
Kristian Høgsberg [Thu, 3 Oct 2013 05:14:23 +0000 (22:14 -0700)]
configure.ac: Bump version to 1.2.92
Kristian Høgsberg [Wed, 2 Oct 2013 20:06:02 +0000 (13:06 -0700)]
launcher: Print a more descriptive error message when we don't get a VT
weston-launch has two supported use cases now: either launch from
and VT login as a regular user (running within that session) or
from an init script (systemd or such) with the -u option to create
a session for the specified user. Running from within X or ssh is
not possible. It's still possible to run weston as root from X or ssh
but that's strictly a development/debug/test feature.
https://bugs.freedesktop.org/show_bug.cgi?id=69727
Kristian Høgsberg [Wed, 2 Oct 2013 17:53:33 +0000 (10:53 -0700)]
launcher: Add back support for specifying VT to run on
This is only available when running weston directly as root typically for
ssh logins. It's a somewhat destructive option, as it will take over any
existing VT completely, unless there's already an display server running
there.
https://bugs.freedesktop.org/show_bug.cgi?id=69731
Kristian Høgsberg [Wed, 2 Oct 2013 17:49:05 +0000 (10:49 -0700)]
launcher: Bail out if we can't be drm master
If we can't be drm master, we won't be able to do anything useful with
the drm device.
Kristian Høgsberg [Tue, 1 Oct 2013 22:37:09 +0000 (15:37 -0700)]
launcher: Set make sure we're drm master when opening the drm device
In case we try to run on a tty where some other process is already
drm master, back off and exit with an error message.
Kristian Høgsberg [Tue, 1 Oct 2013 19:54:55 +0000 (12:54 -0700)]
launcher: Fail weston_launcher_create() if tty setup fails
Neil Roberts [Mon, 30 Sep 2013 12:14:47 +0000 (13:14 +0100)]
Set new state before emitting wake signal in weston_compsitor_wake
The wake handler set up by the shell will try to unlock the screen
which works by setting up an animation which fades in the display. The
animation is started by first scheduling a repaint. Subsequent
repaints are scheduled whenever the previous frame is finished.
However in the case of the wake up signal the state is still
WESTON_COMPOSITOR_SLEEPING when the animation is started.
weston_output_schedule_repaint() ignores attempts to schedule a
repaint if the compositor is sleeping which means the animation never
gets run and will never complete.
The animation gets unstuck and continues if anything else schedules a
repaint after the state has been changed so the bug only gets hit in
certain conditions. The first wake up creates the lock surface which
causes a redraw when the first buffer is attached so the first wake up
is always ok. A redraw can be triggered in the subsequent wake ups
just by moving the mouse.
A good way to trigger the bug is to try to wake up the compositor by
pressing the shift key. If you let the compositor go back to sleep
after waking it up without unlocking it, the second press of the shift
key will not cause a redraw so the animation will not run and it won't
fade in.
https://bugs.freedesktop.org/show_bug.cgi?id=69719
Tomeu Vizoso [Tue, 1 Oct 2013 10:27:19 +0000 (12:27 +0200)]
weston-egl: Update weston-egl-ext.h: s/wl_buffer/wl_resource
As struct wl_buffer has been deprecated since 1.2.
Tomeu Vizoso [Tue, 1 Oct 2013 10:20:29 +0000 (12:20 +0200)]
weston-launch: Only drop privileges if running as root
Aaron Faanes [Tue, 1 Oct 2013 03:06:39 +0000 (22:06 -0500)]
compositor: fix typo in error message
Adrian Negreanu [Fri, 27 Sep 2013 17:58:45 +0000 (20:58 +0300)]
launcher-util: pull in drm only for compositor-drm
Add drm_set_master and drm_drop_master
as wrappers for drm(Set|Drop)Master, when building compositor-drm
or as empty functions otherwise.
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Hardening [Mon, 23 Sep 2013 22:45:53 +0000 (00:45 +0200)]
Resize the shell when the mode is switched
Resize the panel and the background when we're notified of a mode
switch.
Alexandru DAMIAN [Thu, 26 Sep 2013 09:27:16 +0000 (10:27 +0100)]
config: Don't crash if we don't have a config file
Adding a check in weston_config_full_path so that
we don't crash if we started without a config file.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Adrian Negreanu [Thu, 26 Sep 2013 16:31:32 +0000 (19:31 +0300)]
compositor-fbdev: drop dependency on libdrm
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Alexandru DAMIAN [Wed, 25 Sep 2013 13:47:47 +0000 (14:47 +0100)]
compositor: check if seteuid worked
Checking the return value from seteuid in
order to not launch clients with the wrong effective uid.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Kristian Høgsberg [Wed, 25 Sep 2013 22:46:42 +0000 (15:46 -0700)]
compositor-drm: Match the EGLConfig native visual ID if it has one
We'll add the GBM format code as the native visual ID for EGLConfigs
when running on GBM. This patch lets the drm backend pass in the
format code it's using with KMS and make sure we get a confing that
matches. In the future, mesa will add support for 10 bpc configs
which will match the "at least 8 color bits" requirement. By also
matching the native visual ID, we avoid rendering XRGB2101010 into a
XRGB8888 KMS framebuffer.
Neil Roberts [Tue, 24 Sep 2013 19:05:07 +0000 (20:05 +0100)]
evdev: Process touch up events of single-touch devices
Previously only the touch up key event was used for single-touch
devices and the touch down event was generated on the first motion
event. This was breaking if the touch up and down events were sent
without a motion in-between because the evdev driver wouldn't generate
a touch down event and Weston would lose track of the number of touch
points that are down. This patch changes it to track the up and down
key events as pending events similar to how it does for multi-touch
devices.
https://bugs.freedesktop.org/show_bug.cgi?id=69759
Neil Roberts [Tue, 24 Sep 2013 11:09:03 +0000 (12:09 +0100)]
evdev: Only track one pending event
Instead of having a mask of pending events there is now an enum with a
single value to represent the one pending event. The event gets
flushed explicitly as part of the handling code for each event type
rather than in the outer event reading loop. The pending event is used
so that we can combine multiple motion events into one and to make
sure that we have recieved the latest position before sending a touch
up or down event. This should fix the following problems with the old
approach:
• If you release a finger and press it down again quickly you could
get the up and down events in the same batch. However the pending
events were always processed in the order down then up so it would
end up notifying two down events and then an up. The pending event
is now always flushed when there is a new up or down event so they
will always be in the right order.
• When it got a slot event it would immediately change the slot number
and then set the pending event. Then when it flushed the events it
would use the new slot number to flush the old pending event so the
events could have the wrong finger. The pending event is now
immediately flushed when a slot event is received so it will have
the right finger.
• If you get more than 32 events in one read then it was resetting the
pending events before processing the next batch in
evdev_process_events. If four fingers were pressed down at once then
it ended up with more than 32 events and the sync message would be
in the second batch. The pending flag for the last finger was
getting cleared so it never got emitted. In this patch the pending
event is no longer reset after reading nor is it explicitly flushed.
Instead it is flushed when we receive a EV_SYN event or a different
pending event needs to replace it.
The touchpad handling code was trying to use the pending event
mechanism to notify the relative motion events. I'm not sure why it
was doing this because it looks the event would effectively get
emitted as soon as the touchpad_process function is finished anyway
and it wasn't accumulating the values. Instead I've just changed it to
emit the event directly.
https://bugs.freedesktop.org/show_bug.cgi?id=67563
Pier Luigi Fiorini [Mon, 23 Sep 2013 05:26:03 +0000 (07:26 +0200)]
version.h: Add version check macro
Make it easier to check for a Weston version.
Stefan Schmidt [Mon, 23 Sep 2013 10:25:29 +0000 (11:25 +0100)]
clients: Include and link against math lib for new multi-resource
Linking failed with missing ceil() here. Making sure that we include
the header and add the missing -lm.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Giulio Camuffo [Mon, 23 Sep 2013 10:33:39 +0000 (12:33 +0200)]
input: check that the new focus surface has a valid resource
Here too we must make sure the surface has a valid resource, as
there are some (xwayland, surfaces created by the shell) that
don't have it.
Fix a Weston crash when setting a mpv window fullscreen on drm.
Emilio Pozuelo Monfort [Mon, 23 Sep 2013 10:49:02 +0000 (12:49 +0200)]
Update .gitignore
Emilio Pozuelo Monfort [Mon, 23 Sep 2013 10:49:01 +0000 (12:49 +0200)]
weston.ini: update path for the flower client
Kristian Høgsberg [Sun, 22 Sep 2013 21:16:11 +0000 (14:16 -0700)]
configure.ac: Update version to 1.2.91
Kristian Høgsberg [Sun, 22 Sep 2013 21:28:31 +0000 (14:28 -0700)]
Add vaapi-recorder.h to SOURCES to fix distcheck
Neil Roberts [Fri, 20 Sep 2013 14:03:29 +0000 (15:03 +0100)]
evdev: Flush motion events when the slot changes, not just after sync
If two fingers are released almost simultaneously then evdev can send
the touch up events in one bunch without sending a sync event
in-between. However, the evdev_device struct only keeps track of one
pending touch up event so in this case the second touch up event would
override the first and it would be lost. This patch changes it to also
flush the events whenever the slot changes so that it will flush the
previous touch up event before trying to queue the next one.
https://bugs.freedesktop.org/show_bug.cgi?id=67563
Giulio Camuffo [Sat, 21 Sep 2013 16:08:28 +0000 (18:08 +0200)]
compositor: when unmapping a surface remove it from the compositor's list
compositor.surface_list is recreated every redraw with the mapped
surfaces, but if a surface gets unmapped and then in the same frame
weston_compositor_pick_surface() is called we must make sure it
does not pick the unmapped surface, since it traverses the
surface_list to find one.
If after the unmap the surface gets also deleted it's even more
important, as it must not pick a destroyed surface.
Kristian Høgsberg [Sun, 22 Sep 2013 06:17:35 +0000 (23:17 -0700)]
compositor: Log the full path of the config file we're using
Kristian Høgsberg [Sun, 22 Sep 2013 06:02:31 +0000 (23:02 -0700)]
config-parser: Make weston_config_parse() tkae a file name
Take a basename of the config file to parse instead of an fd.
Kristian Høgsberg [Sun, 22 Sep 2013 05:36:50 +0000 (22:36 -0700)]
shared: Remove no longer used parse_config_file()
Kristian Høgsberg [Sun, 22 Sep 2013 05:35:13 +0000 (22:35 -0700)]
tablet-shell: Use new weston_config instead of old config parse
Kristian Høgsberg [Sun, 22 Sep 2013 05:26:10 +0000 (22:26 -0700)]
window.c: Port to use weston_config instead of old parser
Kristian Høgsberg [Sun, 22 Sep 2013 05:23:08 +0000 (22:23 -0700)]
terminal: Port to new weston_config parse
Kristian Høgsberg [Sun, 22 Sep 2013 04:26:05 +0000 (21:26 -0700)]
compositor: Unlink unmapped surface instead of rebuilding surface list
When unmap and destroy a surface we need to make sure we don't pick it
before we rebuild the new surface list. Currently we ensure this
by rebuilding the surface list when destroying a surface, but just
removing the surface should be enough.
Giulio Camuffo [Fri, 20 Sep 2013 14:16:06 +0000 (16:16 +0200)]
xwm: remove the destroy listener from the old surface signal
Neil Roberts [Thu, 19 Sep 2013 16:32:01 +0000 (17:32 +0100)]
Add a test client to test multiple pointer/keyboard resources
This adds a hacked version of simple-shm which can create multiple
pointer and keyboard resources. The resources are created with the
command line options -p and -k. Both take an integer argument which
specifies the time in seconds after the program is started when the
resource should be created. It can also take a second time with a
colon separator to specify when the resource should be released.
For example:
weston-multi-resource -p5 -p7 -k9 -p12:14
That would create a pointer after 5 seconds, a second pointer 2
seconds later, a keyboard 2 seconds after that, a third pointer after
a further 3 seconds and finally after 2 more seconds it would release
that final pointer resource.
This can be used along with WAYLAND_DEBUG to check that it gets the
right events for example if the pointer is created while the client's
surface already has focus and so on.
Neil Roberts [Thu, 19 Sep 2013 16:32:00 +0000 (17:32 +0100)]
input: Emit events on all resources for a client
The Wayland protocol permits a client to request the pointer, keyboard
and touch multiple times from the seat global. This is very useful in a
component like Clutter-GTK where we are combining two libraries that use
Wayland together.
This change migrates the weston input handling code to emit the
events for all the resources for the client by using the newly added
wl_resource_for_each macro to iterate over the resources that are
associated with the focused surface's client.
We maintain a list of focused resources on the pointer and keyboard
which is updated when the focus changes. However since we can have
resources created after the focus has already been set we must add the
resources to the right list and also update any state.
Additionally when setting the pointer focus it will now send the
keyboard modifiers regardless of whether the focused client has a
pointer resource. This is important because otherwise if the client
gets the pointer later than you getting the keyboard then the
modifiers might not be up-to-date.
Co-author: Neil Roberts <neil@linux.intel.com>
Hardening [Wed, 18 Sep 2013 21:56:36 +0000 (23:56 +0200)]
Notify clients on mode_switch()
This patch implements the notification of clients during mode_switch.
As discussed on IRC, clients are notified of mode_switch only when the
"native" mode is changed and activated. That means that if the native
mode is changed and the compositor had activated a temporary mode for
a fullscreen surface, the clients will be notified only when the native
mode is restored.
The scaling factor is treated the same way as modes.
Hardening [Wed, 18 Sep 2013 21:56:35 +0000 (23:56 +0200)]
Rename current, origin, scale, origin_scale
This patch renames that fields to have consistent names.
Giulio Camuffo [Wed, 18 Sep 2013 13:20:04 +0000 (15:20 +0200)]
xwm: set the right cursor when hovering on the decoration borders
use the alternative cursor names used also in window.c, since the
names it used previously are not guaranteed to exist in all themes.
Giulio Camuffo [Tue, 17 Sep 2013 14:43:45 +0000 (16:43 +0200)]
xwm: set the window's shsurf pointer to NULL on unmap handling
the unmap event will be followed by the deletion of the weston_surface,
so the shell_surface will also be deleted by the shell. Having removed
the surface_destroy_listener, the surface_destroy callback doesn't
get called, so reset the value of shsurf here.
Axel Davy [Tue, 17 Sep 2013 12:55:55 +0000 (14:55 +0200)]
Restoring alpha after the shell effects.
After the fade or zoom effects, alpha could not have been 1.0, preventing
not redrawing behind opaque windows.
This patch add a reset function in weston_surface_animation to reset
some variables the effects affect.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Stefan Schmidt [Tue, 17 Sep 2013 09:54:09 +0000 (10:54 +0100)]
input: Fix trailing whitspaces and indent.
Just some cosmetics to conform to the wayland coding style.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Kristian Høgsberg [Thu, 19 Sep 2013 06:00:17 +0000 (23:00 -0700)]
launcher: Move rest of tty object into struct weston_launcher
The struct weston_launcher object will now either handle tty and vt switching
details in-process (when running weston directly as root) or talk to
the weston-launch process.
Kristian Høgsberg [Thu, 19 Sep 2013 05:14:09 +0000 (22:14 -0700)]
weston-launch: Use fstat to make sure we stat the right fd
Instead of the racy stat+open, open first and then use fstat. We want to
make sure we're stating the fd we'll be sending to weston and nothing else.
Kristian Høgsberg [Wed, 18 Sep 2013 05:43:22 +0000 (22:43 -0700)]
launcher: Handle tty setup and teardown in launcher
Kristian Høgsberg [Wed, 18 Sep 2013 05:15:37 +0000 (22:15 -0700)]
launcher: Handle drm set/drop master and vt switch signals in launcher
Kristian Høgsberg [Tue, 17 Sep 2013 23:02:57 +0000 (16:02 -0700)]
compositor: Generalize VT switching as a session_signal
Instead of a callback from the tty module, we now have a compositor level
signal that fires when our session is activated or deactivated.
Kristian Høgsberg [Tue, 17 Sep 2013 21:41:03 +0000 (14:41 -0700)]
launcher: Collect launcher state in new struct weston_launcher
We're going to add a bit more launcher state, so start out by creating
a new struct weston_launcher we can track it in.
Kristian Høgsberg [Wed, 18 Sep 2013 18:01:48 +0000 (11:01 -0700)]
weston-launch: Use SOCK_SEQPACKET for the launcher socket
This lets us detect hang-up when weston-launch dies and clean up properly.
Kristian Høgsberg [Wed, 18 Sep 2013 18:00:56 +0000 (11:00 -0700)]
weston-launch: Pass the right CLOEXEC flag to fcntl
Passing O_CLOEXEC to fcntl is wrong, we need to pass FD_CLOEXEC.