If there is no weston-launcher available, launcher-util.c will fall back
to opening the given file itself. It that case it does not set the
close-on-exec flag, and will presumably leak the file descriptor to
children.
Use O_CLOEXEC on the fallback path, too.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
When we hit a segv, it's often the case that we might crash again in
the attempt to clean up. Instead we introduce a minimal restore callback
in the backend abstraction, that shuts down as simply as possible. Then
we can call that from the segv handler, and then to aid debugging, we
raise SIGTRAP in the segv handler. This lets us run gdb on weston from
a different vt, and if we tell gdb
(gdb) handle SIGSEGV nostop
gdb won't stop when the segv happens but let weston clean up and switch vt,
and then stop when SIGTRAP is raised.
It's also possible to just let gdb catch the segv, and then use sysrq+k
followed by manual vt switch to get back.
Parse the config file for [output] sections and check for 'name'
and 'mode' keys. The key strings are compared to what is reported
by weston log. The 'mode' key string can be one of the following:
1) WIDTHxHEIGHT - one that is reported by weston log
2) off - Disables the output
3) preferred - Uses the preferred mode
4) current - Uses the mode currently driving the crtc
If a connector is not attached to a crtc, weston fails to bring it up.
Typically kms fbdev drives all crtc and connectors, but if kms hasn't been
initialzed and weston is the first to set a mode of if a monitor is
hotplugged, we just fail to bring it up.
(krh: reformatted and edited a bit from original patch)
Simply exit(1)'ing the program will leave the VT unusable, since
DRM backend's clean-up does not run.
After a backend has been initialised, prefer jumping to clean-up instead
of directly exiting.
This fixes the case where 'weston-launch -- -i 5' would leave the
console unusable.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Make simple-egl toggle the fullscreen state whenever the key F11 is
pressed. A sync callback is used to stop drawing while the surface has
not received the configure event, to prevent a buffer with the windowed
size to be attached to the surface after the set_fullscreen request.
We now support specifying environment variables and arguments in launchers
by saying
path=GDK_BACKEND=wayland gnome-terminal --full-screen
for example.
https://bugs.freedesktop.org/show_bug.cgi?id=47920
Most touchscreen drivers provide ABS_X and BTN_TOUCH for legacy
single-touch emulation modes, but this isn't mandatory. Make sure we
don't ignore touchscreens with provide multitouch events with the new
API only.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
On X the global absolute coordinates are sent in ConfigureNotify and transient
windows are mapped exactly on that position. On Wayland we don't have the
concept of global coordinates, and that's a problem for transient surfaces
without transient_for set because they rely on such hint for setting their
positioning.
So this solution is a workaround. It guesses a parent based on the last
focused window to determine the relative position of the transient surface.
This put transient windows of Chrome browser back to work.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Commit eaee7841 took out the configure positioning of windows. This patch
brings it back and addresses also logic for resizing and sub-menus, that was
not covered on that commit.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This is necessary because all clients need a way to create
text_models, but only one client at a time can be bound to
the input_method global (else we don't know to whom we are
supposed to send events).