Commit graph

3797 commits

Author SHA1 Message Date
emersion
84e87be6df
Merge pull request #1177 from ascent12/check_prime
Check for DRM prime
2018-08-05 07:46:29 +01:00
Scott Anderson
2d8f53affd Check for DRM prime
This will indicate the user properly when multi-GPU is not supported by
their GPU driver.
2018-08-05 18:25:25 +12:00
Drew DeVault
e8fa25e027
Merge pull request #1168 from manio/multi-gpu
Fix support for multiple GPU
2018-08-04 12:16:34 -04:00
Scott Anderson
1a2b3445dc Remove unused data from gbm_bo userdata
These aren't used anymore and crashes when the gbm_bo tries to get
destroyed (e.g. on hotplug).
2018-08-04 17:02:53 +12:00
Scott Anderson
4bee710c30 Fix hardware cursor on secondary GPU
Create rendering resources on parent GPU, so that we can sample the
passed in texture properly. The cursor buffer needs to remain on the
same GPU.
2018-08-04 15:08:28 +12:00
Ryan Dwyer
23e2c3c759
Merge pull request #1175 from emersion/fix-xdg-output-layout-destroy
xdg-output: fix segfault in handle_layout_destroy
2018-08-03 23:11:11 +10:00
emersion
c4522062f6 xdg-output: fix segfault in handle_layout_destroy 2018-08-03 14:03:53 +01:00
Mariusz Bialonczyk
e547e55be0 multi-gpu: do not flip screens on secondary GPU
All screens on secondary GPU in multiple GPU configurations
was flipped 180.

The flipped screens was always on secondary card (the primary card
was always correct).

Tested on nouveau with:
WLR_DRM_DEVICES=/dev/dri/card1:/dev/dri/card2
WLR_DRM_DEVICES=/dev/dri/card2:/dev/dri/card1

The commit is fixing this problem. Now all screens are "normal".
2018-08-03 07:43:22 +02:00
Mariusz Bialonczyk
ad406db21c gles2: change context when it is not current
Texture functions, that create and manipulate textures should switch
the current context if necessary.

thanks to: @emersion

Fixes #934
2018-08-03 07:43:22 +02:00
Mariusz Bialonczyk
15dacebc36 multi-backend: do not expose internal renderers
backend_get_renderer() is now returning the renderer of the primary GPU, instead
of its own renderer, since that's the thing which actually does all of the "real"
rendering

wlr_multi_backend_add() is now adding all subbackends (otherwise only one GPU
is handled).

credits: @ascent12
2018-08-03 07:43:22 +02:00
Scott Anderson
eb9c9d8852
Merge pull request #1173 from sdilts/add-missing-libinput
Add missing dependency libinput to types/meson.build
2018-08-03 14:58:22 +12:00
sdilts
c95078320c Add missing dependency libinput to types/meson.build
The file `types/tablet_v2/wlr_tablet_v2.c` includes <libinput.h>.
Without this change, libinput.h  may not be found on
some systems.
2018-08-02 20:13:48 -06:00
Drew DeVault
1654fc80eb
Merge pull request #1157 from emersion/wlr-gamma-control
Implement wlr-gamma-control-unstable-v1
2018-08-02 18:48:09 -04:00
Drew DeVault
0780d7856a
Merge pull request #1171 from emersion/xwayland-document-sigusr1
xwayland: document SIGUSR1 handler
2018-08-02 18:40:53 -04:00
emersion
c3afe4f42e gamma-control-v1: improve error handling 2018-08-02 23:33:59 +01:00
emersion
bbd0fbe573 gamma-control-v1: fix fds not closed 2018-08-02 23:33:59 +01:00
emersion
2ae0575631 examples/gamma-control: fix brightness formula 2018-08-02 23:33:59 +01:00
emersion
b0c32019c3 examples/gamma-control: clamp values, default brightness to 1 2018-08-02 23:33:59 +01:00
emersion
1d97202ec2 examples: add gamma-control 2018-08-02 23:33:59 +01:00
emersion
364afced3e backend/drm: remove unnecessary casts 2018-08-02 23:33:59 +01:00
emersion
1705316fa7 gamma-control-v1: set O_NONBLOCK, improve error handling style 2018-08-02 23:33:59 +01:00
emersion
73b7111846 gamma-control-v1: reset gamma table when control is destroyed 2018-08-02 23:33:59 +01:00
emersion
2ebecb6727 backend/drm: allow to pass empty gamma ramp to reset it 2018-08-02 23:33:59 +01:00
emersion
e21563ec76 output: document gamma functions 2018-08-02 23:33:59 +01:00
emersion
6e8892d4d7 gamma-control-v1: don't insert control in the list before checking unicity 2018-08-02 23:33:59 +01:00
emersion
a5cab82a0f rootston: fire up wlr-gamma-control-unstable-v1 2018-08-02 23:33:59 +01:00
emersion
a149c2370a Implement wlr-gamma-control-unstable-v1 2018-08-02 23:33:04 +01:00
emersion
9dd4388ed9 xwayland: document SIGUSR1 handler 2018-08-02 23:29:34 +01:00
Drew DeVault
5642c5cc8f
Merge pull request #1053 from emersion/xdg-decoration
Add xdg-decoration-unstable-v1 support
2018-08-02 09:33:10 -04:00
Brian Ashworth
a3c33e93b8
Merge pull request #1167 from ammen99/master
rootston: focus newly-created surfaces
2018-07-29 22:03:53 -04:00
Drew DeVault
1c7957cdc1
Merge pull request #1131 from swaywm/initial-stable
Initial pass on API stability guarantees
2018-07-29 19:33:09 -04:00
Drew DeVault
211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Ilia Bozhinov
2e6eb097b6 rootston: focus newly-created surfaces
Whenever a new surface is created, we have to update the cursor focus,
even if there's no input event. So, we generate one motion event, and
reuse the code to update the proper cursor focus. We need to do this
for all surface roles - toplevels, popups, subsurfaces.

Fixes #1162
2018-07-29 21:58:33 +03:00
Drew DeVault
e67cb8c07c
Merge pull request #1164 from emersion/fix-xwayland
Revert "rootston: Reap child processes"
2018-07-29 10:49:51 -04:00
Drew DeVault
5734d0530c
Merge pull request #1165 from Ongy/reintroduce_is_unmanaged
reintroduce xwayland is_unmanaged
2018-07-29 10:49:29 -04:00
Drew DeVault
f572bc065e
Merge pull request #1166 from emersion/cleanup-example-simple
examples: cleanup simple
2018-07-29 10:46:41 -04:00
emersion
d4181c5a7a examples: cleanup simple
- Move a log to where it should be
- Enforce code style
- Rename wlr to backend
2018-07-29 15:32:25 +01:00
Markus Ongyerth
81cc842f8f reintroduce xwayland is_unmanaged
153f37bdf5 (#1145) removed the
wlr_xwayland_is_unamanged function while fixing OR, because it was
belieived that it's supposed to work around the broken OR handling.

This was a misunderstanding. is_unmanaged is (while sort of a hack)
intended to work around inherent differences between "real" X sessions
and our Xwayland/wayland situation.

The main reason it exists is to support applications like rofi and dzen,
while not handing focus to other OR windows (which should *not* be
required).
Traditionally, these applications just grabbed input from X and didn't
need to be focused by any logic in the WM. Which of course doesn't work
in wayland compositors. So we have to give them focus in some way.
Giving *every* OR window focus, breaks other applications that don't
expect focus to change.

A testcase that was pointed out to me where wlr_xwayland_is_unamanged was
breaking things is https://github.com/swaywm/sway/issues/2128 (syncplay,
gitk, gitgui)
Supposedly it broke using keyboard to navigate the menus.
I can't reproduce this with this patch. The popups can be navigated as
long as the parent has focus.
2018-07-29 14:43:17 +02:00
emersion
067a496c8b Revert "rootston: Reap child processes"
This reverts commit b6ed1f29a4.

This commit breaks xwayland.
2018-07-29 09:19:26 +01:00
emersion
555721f714 Add xdg-decoration-unstable-v1 support 2018-07-28 22:48:07 +01:00
Drew DeVault
f1b65b34a6
Merge pull request #1127 from emersion/surface-precommit
surface: add wlr_surface_role.precommit
2018-07-27 13:21:03 -04:00
Genki Sky
b6ed1f29a4 rootston: Reap child processes
Just install a SIG_IGN handler, which is defined by POSIX.1-2001 to
reap the child.

To test, spawn any process (e.g. GUI application) with a keybinding,
close that process, verify it doesn't show up as a <defunct> zombie in
ps(1) output.
2018-07-24 08:22:35 -04:00
Markus Ongyerth
d5950255de tablet-v2 tablet_tool grab implementation
Implement the basic logic for tablet-v2 tablet_tool's grabs. And plug in
the default grab.
2018-07-23 10:08:10 +02:00
emersion
2297797bf9
Merge pull request #1159 from ammen99/master
xdg-shell(-v6): add set_title and set_app_id toplevel signals
2018-07-22 21:11:52 +01:00
Ilia Bozhinov
8b7c85d765 xdg-shell(-v6): add set_title and set_app_id toplevel signals
This is useful for example when rendering decorations
2018-07-22 22:42:37 +03:00
emersion
8935f3724d
Merge pull request #1149 from emersion/export-map-without-version
Remove symbol versioning from DSO
2018-07-22 20:06:52 +01:00
Drew DeVault
70ebe88b55
Merge pull request #1155 from emersion/fix-os-compat-config
util: include config in os-compatibility.c
2018-07-21 15:49:22 -04:00
emersion
a3b90bace3 util: include config in os-compatibility.c 2018-07-21 20:39:00 +01: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
Drew DeVault
83009d69bf
Merge pull request #1152 from emersion/improve-os-compat
Use posix_fallocate when available
2018-07-21 08:43:29 -04:00