Commit Graph

872 Commits

Author SHA1 Message Date
Simon Ser 67cd84de45 rootston: add support for direct scan-out 2019-06-07 09:06:11 -04:00
Simon Ser 3dec88e455 Remove orbital screenshooter and gamma-control
These are undocumented, outdated protocols that have a better wlr-protocols
equivalent.
2019-06-02 09:30:47 -04:00
Silvan Jegen 461c4f58a6 rootston: remove duplicated include 2019-05-19 19:50:14 +03:00
Ilia Bozhinov 8cc0859814 rootston: add support for foreign-toplevel fullscreening 2019-04-29 00:00:53 +03:00
Simon Ser 8b1220f5a3 rootston: fix damage tracking debug mode
We want to damage the whole output in this mode. However if we overwrite the
damaged region after it's useless.

Fixes: 57d32d03a8
2019-04-27 09:59:01 -06:00
Simon Ser 57d32d03a8 rootston: don't submit too much damage
We only need to damage the parts of the screen that changed since last frame,
we don't need to accumulate damage from previous buffers.

We still need to re-render the accumulated damage.

Fixes https://github.com/swaywm/wlroots/issues/1665
2019-04-26 10:08:08 -06:00
Drew DeVault 736632ad4e Remove wlr_wl_shell 2019-04-26 18:23:25 +03:00
Simon Ser 20690346c7 output: rename needs_commit to needs_frame
This new name makes more sense, since it is a request from the backend to get
a new frame. In the future a commit may not convey a new frame.
2019-04-23 14:34:30 -06:00
Simon Ser 5e6766a165 output-damage: refactor API
wlr_output_damage_make_current has been renamed to
wlr_output_damage_attach_render, since it's just a wrapper for
wlr_output_attach_render.

wlr_output_damage_swap_buffers has been removed completely. Instead,
wlr_output_damage now listens to successful wlr_output commits and updates its
internal state accordingly.
2019-04-23 14:34:30 -06:00
Simon Ser 56ceed38bf rootston: use wlr_output_preferred_mode
Also fix rootston setting the preferred mode when another mode is specified in
the config file.
2019-04-22 11:15:38 -06:00
Alyssa Ross 95b22619e0 Fix missing headers when building without X11
The deleted includes are redundant, because other headers will include
the necessary files. Additionally, they cause build failures, because
including EGL/egl.h or EGL/eglext.h directly, instead of through
wlr/render/egl.h or wlr/render/interface.h, will mean that
MESA_EGL_NO_X11_HEADERS will not have been defined, and so the EGL
headers will attempt to pull in unnecessary X11 headers that may not
exist on the system.

For the headers produced by glgen.sh, the includes couldn't simply be
deleted, because no other header would include the EGL headers. Neither
wlr/render/egl.h or wlr/render/interface.h felt appropriate to include,
so I opted instead to copy the MESA_EGL_NO_X11_HEADERS definition before
the EGL includes.
2019-04-22 00:04:08 +03:00
Ilia Bozhinov 7a2f929201 rootston: remove disabled outputs from the output layout
We should also be careful when using wlr_output_layout_get_box(), since
it may return null.
2019-04-13 19:31:37 +03:00
emersion 1515c56cae output: remove lx, ly
Fixes https://github.com/swaywm/wlroots/issues/1610
2019-04-13 08:31:30 -06:00
emersion a800aa3fb4 rootston: disable then enable outputs when applying output-management state 2019-04-11 09:19:57 -06:00
emersion ab3446091b output-management-v1: update protocol, add set_custom_mode 2019-04-11 09:19:57 -06:00
emersion 8136605cfb output-management-v1: support applying configuration 2019-04-11 09:19:57 -06:00
emersion ee77a65fe3 rootston: update output-management-v1 state when output is modeset 2019-04-11 09:19:57 -06:00
emersion 54d6ba78c3 rootston: add output-management-v1 support 2019-04-11 09:19:57 -06:00
Guido Günther b4f821ca31 rootston: Also iterate layer shell popups
Broken by 62fd03a7be

Closes: #1631
2019-03-24 09:19:36 -06: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
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
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
Guido Günther 65f1ec1d5e rootston: Make add_{switch,binding}_config static 2019-02-26 15:48:59 +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
emersion 9adcbabea4
rootston: make roots_view embedded and remove unions 2019-02-23 15:24:28 +01:00
emersion 9f11bf571e
rootston: add a view child interface 2019-02-23 14:18:32 +01:00
emersion e86c7a3dd6
rootston: move part of desktop.c to view.c, use an interface for views 2019-02-23 12:15:37 +01:00
Sebastian Krzyszkowiak 4f66565606 rootston: surface_at: check for fullscreen surfaces in between TOP and OVERLAY layers
Input order didn't match rendering order, causing pointer events to go into surfaces
that were completely obscured by others (like a LAYER_TOP panel behind a fullscreen
window).
2019-02-22 19:13:57 +01:00
Sebastian Krzyszkowiak de56ea6b1e rootston: don't try to maximize fullscreen surfaces
It doesn't make much sense and actually breaks stuff when using layer-shell
(fullscreen window gets resized, but it's still fullscreen, leading to black
bars where the shell layers are behind).
2019-02-22 17:31:20 +01:00
emersion ae2aeb65cc
rootston: cancel drag on invalid serial 2019-02-20 18:42:34 +01:00
emersion 6291e84532
data-device: refactor wlr_drag 2019-02-20 18:42:29 +01:00
Drew DeVault ea28887a23
Merge pull request #1493 from emersion/primary-selection-v1
primary-selection-v1: copy from gtk-primary-selection
2019-02-19 08:59:20 -05:00
emersion 943e918a96
subsurface: add map/unmap events
Fixes https://github.com/swaywm/wlroots/issues/1414
2019-02-17 12:01:15 +01:00
emersion 8163f7e1e2
primary-selection-v1: copy from gtk-primary-selection 2019-02-13 19:28:25 +01:00
emersion faa00a4a33
rootston: only allow one drag icon per seat 2019-01-30 15:24:18 +01:00
emersion d6de329d98
seat: don't send motion if pointer hasn't moved 2019-01-30 15:24:17 +01:00
emersion 7309d8c9ac
Fix two issues found with Clang's static analyzer 2019-01-29 19:56:43 +01:00
Greg V 9fe8e37961 Implement the pointer-gestures-unstable-v1 protocol
This protocol relays touchpad gesture events produced by libinput to
supporting clients (e.g. Evince, Eye of GNOME).
2019-01-28 22:06:36 +01:00
emersion 5de26ad8ed
pointer: add a frame event
Frame events group logically connected pointer events. It makes sense to make
the backend responsible for sending frame events, since once the events are
split (ie. once the frame events are stripped) it's not easy to figure out
which events belongs to which frame again.

This is also how Weston handles frame events.

Fixes https://github.com/swaywm/wlroots/issues/1468
2019-01-26 11:04:05 +01:00
emersion 4cb0697e57 data-device, primary-selection: add request_set_selection
This makes compositors able to block and/or customize set_selection requests
coming from clients. For instance, it's possible for a compositor to disable
rich selection content (by removing all MIME types except text/plain). This
commit implements the design proposed in [1].

Two new events are added to wlr_seat: request_set_selection and
request_set_primary_selection. Compositors need to listen to these events and
either destroy the source or effectively set the selection.

Fixes https://github.com/swaywm/wlroots/issues/1138

[1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
2019-01-24 11:38:23 +01:00
emersion a4eb90315e
Fix indentation in various files 2019-01-21 17:56:19 +01:00
emersion 461360aff1
rootston: document why Xwayland is disconnected before clients 2019-01-18 12:20:04 +01:00
Connor E e7fff4f560 Remove wlr_xdg_surface_send_close. 2019-01-13 14:22:49 +00: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
Drew DeVault e61ea7706b
Merge pull request #1423 from emersion/data-control
Implement data-control-unstable-v1
2019-01-06 22:41:35 -05:00
emersion f71cf15aad
relative-pointer-v1: move pointer iteration in wlroots
This makes sure we always send events to the right client.
2019-01-06 12:17:31 +01:00