Commit graph

3644 commits

Author SHA1 Message Date
emersion
43bd1d807a util/log: setup wayland log handler 2019-04-07 16:09:00 -06:00
Markus Ongyerth
09b2833dcd send proximity_out in proximity in for tablet_v2
When the proximity_in event is sent for tablet_v2 and there's already a
surface that currently has tablet (tool) focus, it should be told that
this is no longer the case, so we need to send the proximity_out event.
2019-03-31 20:16:03 +03:00
Stuart Dilts
08454adada types/meson.build: Add compile args for libinput to lib_wlr_types (#1636)
* Add compile args for libinput to lib_wlr_types

Fixes the build on openSUSE Tumbleweed

* Remove libinput include from wlr_tablet_v2.c

+ libinput isn't used in the file
+ Also remove libinput dependency from types/meson.build
2019-03-27 19:31:20 +02:00
Brian Ashworth
17f688735f wlr_xdg_toplevel_v6: store pending fullscreen output
Since the fullscreen request may be made before the toplevel's surface
is mapped, the requested fullscreen output needs to be stored so it
can be retrieved on map (along with the existing fullscreen property).

This commit makes the required changes for wlr_xdg_toplevel_v6.
2019-03-27 10:04:10 +02:00
Brian Ashworth
4e614683b7 wlr_xdg_toplevel: store pending fullscreen output
Since the fullscreen request may be made before the toplevel's surface
is mapped, the requested fullscreen output needs to be stored so it
can be retrieved on map (along with the existing fullscreen property).

This commit makes the required changes for wlr_xdg_toplevel.
2019-03-27 10:04:10 +02:00
Guido Günther
b4f821ca31 rootston: Also iterate layer shell popups
Broken by 62fd03a7be

Closes: #1631
2019-03-24 09:19:36 -06:00
Ilia Bozhinov
4281c8c566 meson.build: require libinput >= 1.9.0
We use LIBINPUT_SWITCH_TABLET_MODE, which is introduced in 1.9.0
2019-03-22 17:14:04 +02:00
Guido Günther
cd60f40bbb wlr_output: Add preferred property (#1625)
* wlr_output: Indicate modes link

* wlr_output: Introduce preferred flag

This indicates an outputs preferred mode.

* drm: Set preferred flag for an outputs preferred mode
2019-03-21 22:12:43 +02:00
Ryan Walklin
4453757fc9 s/lid_switch/switch_device
Rename lid_switch to switch_device to disambiguate lid and tablet mode switches.
2019-03-19 22:45:58 -04:00
Brian Ashworth
6b7f5e4010 backend/noop: improve output number handling
This improves the way the output numbers are handled for the noop
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
NOOP-2, which causes an issue since the identifier will also be
identical. With this, the last output is NOOP-3 and the outputs can be
distinguished.
2019-03-15 18:38:12 +02:00
Brian Ashworth
c97f0eb0f2 backend/headless: improve output number handling
This improves the way the output numbers are handled for the headless
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
HEADLESS-2, which causes an issue since the identifier will also be
identical. With this, the last output is HEADLESS-3 and the outputs can
be distinguished.
2019-03-15 18:37:56 +02:00
Brian Ashworth
b135599e5a backend/x11: improve output number handling
This improves the way the output numbers are handled for the x11
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
X11-2, which causes an issue since the identifier will also be
identical. With this, the last output is X11-3 and the outputs can be
distinguished.
2019-03-15 18:37:35 +02:00
Brian Ashworth
67523fb228 backend/wayland: improve output number handling
This improves the way the output numbers are handled for the wayland
backend. Instead of using the number of active outputs plus one, the
last used number is stored and new outputs will increment it. This
fixes the situation where you start with one output, create a second,
close the first, and create a third. Without this, both outputs will be
`WL-2`, which causes an issue since the identifier will also be
identical. With this, the last output is `WL-3` and the outputs can be
distinguished.
2019-03-15 09:43:40 +02:00
emersion
408eca7dfa meson: remove -Wredundant-decls
This is causing issues with wayland-scanner generated files. The client and
server headers are declaring the same structs. We include both in the Wayland
backend.

See https://gitlab.freedesktop.org/wayland/wayland/issues/82
2019-03-12 08:16:07 -06:00
Drew DeVault
c9137cba69 Update version to 0.5.0 2019-03-11 10:40:18 -04:00
Brian Ashworth
aa5c369910 wlr_output_layout_get_box: handle empty layout
If there were no outputs in the output layout,
wlr_output_layout_get_box would return the box:

{
  .x = INT_MIN,
  .y = INT_MIN,
  .width = INT_MIN - INT_MAX,
  .height = INT_MIN - INT_MAX
}

which results in an integer underflow for both the width and height.

This changes the logic to have the box be all zeroes, since an empty
output layout does not have a width or height and the location of
something without a size is irrelevant so this just uses the origin.
2019-03-08 09:45:22 +01:00
Niklas Schulze
2baad6eba6 backend/session: Allow setting a custom tty via WLR_DIRECT_TTY 2019-03-06 13:20:51 +01:00
Scott Anderson
a3c31bb875
Merge pull request #1606 from emersion/xwayland-dev-null
xwayland: set CLOEXEC on /dev/null FD
2019-03-06 02:53:12 +00:00
emersion
8363ca8c9f
xwayland: set CLOEXEC on /dev/null FD
This avoids leaking the FD to Xwayland and its children.
2019-03-06 00:32:24 +01:00
Scott Anderson
6a8f17b5f6 backend/drm: Don't fail on failing to find overlay format
Some hardware exists which doesn't support XRGB/ARGB overlays, and we
aren't even using overlay planes, so don't fail on trying to find a
format.
2019-03-05 23:15:20 +01:00
Scott Anderson
680c4c573c
Merge pull request #1604 from emersion/direct-session-cloexec
backend/session: open TTY with O_CLOEXEC for direct session
2019-03-05 21:03:23 +00:00
emersion
d02548d87a
backend/session: open TTY with O_CLOEXEC for direct session 2019-03-05 19:19:13 +01:00
emersion
30d3426164 seat: add debug logs when validating grab serials
Makes it easier to debug when something goes wrong, e.g. button_count stuck
to 2 because the compositor ate a button release event.
2019-03-04 21:27:14 -07:00
emersion
9601019192 xwayland: don't set DISPLAY
Let the compositor set it. This allows for multiple Xwayland instances to run
at the same time.

Fixes https://github.com/swaywm/wlroots/issues/1442
2019-03-04 12:54:06 -07:00
Ilia Bozhinov
fb106eb979 xwm: fix typos in WM_NORMAL_HINTS handling 2019-03-04 18:49:39 +01:00
Ilia Bozhinov
c9b9e48525 xwm: use min size as base size hint if it is missing and vice versa
This is what ICCCM states that a WM should do.
2019-03-03 14:13:55 -07:00
emersion
6a60dafe59 rootston: fix input events for rotated views 2019-03-02 09:37:05 -07:00
emersion
c2178d51a8 rootston: split rendering code into render.c 2019-03-02 09:37:05 -07:00
emersion
242e9e3bf0 rootston: fix Xwayland children rendering when fullscreen 2019-03-02 09:37:05 -07:00
emersion
bfaf06f04b rootston: fix rotated views rendering 2019-03-02 09:37:05 -07:00
emersion
62fd03a7be rootston: refactor rendering
This implements rootston surface iterators to ease rendering, sending
frame/presentation events and accumulating damage.
2019-03-02 09:37:05 -07:00
emersion
8efeca528f backend/session: add noop session
This is the first step towards being able to run via DRM leasing and on render
nodes.

Test with:

    export WLR_BACKENDS=drm
    export WLR_SESSION=noop
    export WLR_DRM_DEVICES=/dev/dri/renderD128
2019-03-02 08:40:27 -07:00
emersion
755a1c9138 tinywl: send pointer frame events
Fixes https://github.com/swaywm/wlroots/issues/1544
2019-03-02 08:39:41 -07:00
Ian Fan
2e1dd4ae36 seat: fix remaining wlr_button_state enum rename 2019-03-01 21:49:04 +01:00
emersion
e8f012c993 seat: only store serial if pressing a button
The grab serial can be used to start a pointer grab. A button pressed event
should be used for this purpose.

Thus, we should only save the grab serial if it's the first button pressed
event we send. This commit makes it so the serial is not saved if a button is
released while another button is still pressed.
2019-03-01 12:36:19 -07:00
emersion
2fde5c95d8 seat: use wlr_button_state enum instead of uint32_t 2019-03-01 12:36:03 -07:00
emersion
5445d8aad0 meson: enable more compiler warnings 2019-03-01 09:20:23 +01:00
emersion
4135fafecd seat: guard against button count corruption
This is still a compositor bug, and bad events will be sent to clients. We'll
need to track each button separately to handle this in wlroots.
2019-02-28 23:00:57 -05:00
Guido Günther
f8fcd7f06a Remove glEGLImageTargetTexture2DOES
It's declared via render/glapi.txt.
2019-02-28 21:24:22 +01:00
Guido Günther
cf9607f282 wlr_xdg_shell: Remove redundant declaration in the same file 2019-02-28 21:24:22 +01:00
Guido Günther
7da9af31e8 rootston/view: Remove redundant declaration in the same file 2019-02-28 21:24:22 +01:00
Guido Günther
d3b48dfcae Unbreak build with '-Wstrict-prototypes' 2019-02-28 16:41:23 +01:00
Drew DeVault
b46e097fe2 Update version to 0.4.1 2019-02-27 10:56:05 -05:00
Guido Günther
65f1ec1d5e rootston: Make add_{switch,binding}_config static 2019-02-26 15:48:59 +01:00
athrungithub
2000d52405 clang compile fix #1572
clang consider error no enum handled,
in BSD and Linux
2019-02-26 08:05:17 +01:00
emersion
0b33643175
Bump version to 0.4 2019-02-25 23:23:21 +01:00
emersion
d425206719 data-device: check if there's a source before sending dnd_finish
This could cause a segfault in data_offer_destroy if the offer has version < 3.
2019-02-24 19:40:10 -05:00
Jan Beich
421283935b Add xcb-errors to FreeBSD build
Test f8428d1063 at least somewhere to avoid build regressions.
2019-02-24 09:10:02 +01:00
Scott Anderson
d945c97926 backend/drm: Unset cursor on cleanup
This will prevent the cursor from persisting on the Linux framebuffer
terminal on exit.
2019-02-24 09:04:36 +01:00
Drew DeVault
e77e53dae5
Merge pull request #1517 from emersion/refactor-dnd
Refactor drag-and-drop
2019-02-23 13:02:28 -05:00