Commit Graph

14 Commits

Author SHA1 Message Date
Ting-Wei Lan fc6c0ca12e backend/session/freebsd: Fix the way to get TTY path
Previously, the path of TTY is generated using snprintf with %d format.
It works with TTY 1 to 10, but fails with TTY with greater number
because the number used in the name is in base 32 instead of base 10.
Since there is no standard function to convert a number to a string with
a custom base, this commit adds a function to do it.

Fixes: https://github.com/swaywm/wlroots/issues/1854
2019-12-22 11:23:41 +01:00
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
Jan Beich f80d174e8b Simplify evdev includes on FreeBSD by relying on up-to-date package
As evdev-proto is installed by CI some files have been missed:

 ../examples/pointer-constraints.c:2:10: fatal error: 'linux/input-event-codes.h' file not found
 #include <linux/input-event-codes.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../examples/relative-pointer-unstable-v1.c:5:10: fatal error: 'linux/input-event-codes.h' file not found
 #include <linux/input-event-codes.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-01-07 08:08:47 +00:00
sghctoma 9383e1f76c Apply multiseat fixes to FreeBSD direct backend
This commit applies the multiseat fixes that are part of PR #1063 (
commits 964e0a50 and 47895d2) to the FreeBSD direct backend.
2018-09-21 15:02:32 +02:00
emersion 07ea98dab9 backend/session: add assertions 2018-09-18 11:06:01 +02:00
sghctoma 7a5d3c4d3b Implement device type discovery using ioctl calls
This commit implements device type discovery by calling two ioctls
(DRM_IOCTL_VERSION and EVIOCGVERSION) on the device. These iocts are
specific to drm and input devices respectively, therefore we can
determine the device type based on which one returns an error.
2018-09-07 16:37:25 +02:00
sghctoma d948bffd3e Activate last active VT after compositor exit
The VT the compositor was started from was not activated after exiting
the compositor, which resulted in arriving on a blank VT. This commit
fixes that by introducing a new field in direct_session struct that
stores the last active VT so that it can be activated in
direct_session_destroy.
2018-09-02 20:28:06 +02:00
sghctoma 2bd6fbf20e Fix that major(st_rdev) have no meaning on FreeBSD
The major device number does not indicate the device type on FreeBSD,
and AFAIK the only way to differentiate between DRM, input, and other
devices is checking the fd path. This commit implements that.

The drmDropmaster and drmSetmaster calls are necessary, because the
implicit drop (that should occur when the DRM fd is closed) seems not
to be working in some scenarios (e.g. if you have a tmux session
running - maybe the fd is retained somehow by tmux?). This is a
problem, because once you exit the compositor, you can't start it (or
any other program that wants to be DRM master) again until you close
all your tmux sessions.
2018-08-30 11:15:39 +02:00
emersion 7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion 36ead80cd1
Make wlr_signal_emit_safe private 2018-02-12 19:52:47 +01:00
emersion 5e58d46cc1
Add wlr_signal_emit_safe 2018-02-12 09:12:31 +01:00
Greg V 1ae944c071 Use SIGUSR2 for vt switching instead of SIGUSR1
Xwayland uses SIGUSR1 to signal readiness.
With direct(-freebsd) session and Xwayland, wlroots was confusing the
Xwayland readiness signal with a vt switch signal, freezing the desktop.

Same problem was found in Weston in 2014:
https://phabricator.freedesktop.org/T7080
2017-11-22 16:29:31 +03:00
Greg V a5fe9aa736 Add FreeBSD compatibility 2017-10-11 00:07:21 +03:00