Commit Graph

42 Commits

Author SHA1 Message Date
sghctoma ba5df0d21d Fix build failure on non-FreeBSD systems
Accidentally included the FreeBSD-specific dev/evdev/input.h file on
other systems too. This commit fixes that.
2018-09-07 17:44:48 +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
Alexander Bakker 221d412824 Init the new destroy signals added by #1200 2018-08-27 18:21:36 +02:00
Alexander Bakker 20db29779e Add destroy signals to types that are destroyed by wl_display_destroy 2018-08-26 23:23:12 +02:00
Ilia Bozhinov cb42e16f64 session: load GPU devices even if they have zero crtcs/connectors/encoders
On some systems (most notably laptops with two GPUs) there are GPUs that
don't have attached outputs. However, we still want to load those GPUs
because they could still be used by the compositor for rendering.
2018-08-08 07:34:12 +03:00
Drew DeVault 4b096fc114 Revert "Merge pull request #1153 from emersion/include-config"
This reverts commit ef0a6ea4d2, reversing
changes made to 8d03bc9178.
2018-07-21 09:44:20 -04:00
emersion 41094a7df5 Always include config.h 2018-07-21 13:08:23 +01:00
emersion 7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
Vincent Vanlaer ece58514b4 Close fd's obtained from logind 2018-07-01 02:22:57 +02:00
Dominique Martinet 266898ca1f direct session backend: fix closing -1 on error
Found through static analysis
2018-06-30 11:38:21 +09:00
Tobias Blass 482fc48c74 FIX: Suprocess loops endlessly when the control socket closes.
recvmsg(3) returns 0 if the connection partner has shut down its socket.
The communicate function considered 0 a successful message, though, and
keeps calling recvmsg(3) again and again.
2018-06-20 22:00:45 +02:00
Scott Anderson 964e0a50be Check for seat0 properly 2018-06-14 21:02:32 +12:00
Scott Anderson 47985d2dc5 Multiseat fixes 2018-06-14 20:46:16 +12:00
Drew DeVault 1d9be89e2d
Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
Scott Anderson 86269052eb Explicitly export EFL symbols 2018-02-19 14:26:40 +13: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
Johannes Schramm e37ebf6869 style: add comment to empty while loop in logind.c 2018-01-21 17:00:15 +01:00
Johannes Schramm dcc743047b style: include brackets for if/while/for, even if it's a single statement 2018-01-21 16:28:21 +01:00
PoroCYon 7574e27c6a fix build without systemd 2018-01-02 16:39:58 +01:00
Björn Esser ff13849624
config: Avoid clash with other config-headers 2017-12-27 17:13:58 +01:00
Björn Esser 57a09c8ca4
config: Put all defines into config.h 2017-12-26 18:51:27 +01:00
emersion 6001235b04
Listen to display destroy in session
It's not the backend's responsibility to destroy the session anymore.
2017-12-08 11:17:56 +01:00
n3rdopolis 8a2d54c24a
Fix style and string comparison 2017-12-02 12:37:28 -05:00
n3rdopolis a8d8a63fe0
Attempt to fix #454
With logind, only seat0 can use TTYs
2017-12-02 10:50:00 -05: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
emersion bb79ada49f
Fix a bunch of mistakes detected with scan-build 2017-11-16 10:30:54 +01:00
Stefano Ragni f092a37955 Fix typos 2017-11-11 00:45:52 +01:00
Eric Molitor 5be11a5c95 Remove VLA from session.h
VLAs are optional C11 features and not supported by C++.
2017-11-10 15:12:00 +00:00
Greg V a5fe9aa736 Add FreeBSD compatibility 2017-10-11 00:07:21 +03:00
Scott Anderson 9ec9edc40d Check for fd failure properly 2017-10-02 22:01:09 +13:00
Scott Anderson 6cfe47d1d8 Add explicitly picking GPUs with environment var 2017-10-02 21:57:14 +13:00
Scott Anderson fa3d0ed929 Change wlr_session to open every GPU 2017-10-01 16:47:05 +13:00
dudemanguy 175f89f4ff Add elogind support
Resolves SirCmpwn/wlroots#146
2017-09-22 12:02:55 -05:00
Scott Anderson d16b2977f6 Remove single GPU assumptions from wlr_session 2017-08-26 14:50:16 +12:00
Scott Anderson fb93628bda Merge wlr_udev into wlr_session 2017-08-26 14:02:04 +12:00
Scott Anderson 46823152ea Rename functions to be consistent with #93 2017-08-26 11:56:43 +12:00
Scott Anderson cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Scott Anderson 2ae5cd6539 Moved session/ into backend/ 2017-08-06 13:25:26 +12:00