Commit graph

54 commits

Author SHA1 Message Date
Devin Bayer
9d76bca931 wlroots 0.12.0
Antonin Décimo (3):
       Fix typos
       Fix incorrect format parameters
       xwayland: free server in error path
 
 Daniel De Graaf (1):
       wlr_virtual_keyboard: fix fd leak
 
 Daniel Kondor (2):
       foreign-toplevel-management: report parent toplevel
       foreign toplevel: send parent event only to clients that support it
 
 Devin J. Pohly (1):
       drm: fix uninitialized read
 
 Drew DeVault (1):
       Remove xdg-shell v6
 
 Guido Cella (1):
       render: Don't crash on 0 dimensions
 
 Ilia Bozhinov (9):
       xwayland: do not allow apps to change focus after wlroots request
       make sure to fail setting gamma on disabled outputs
       backend/wayland: destroy relative pointer when output is disconnected
       wayland: emit relative pointer events only for current pointer
       xwayland: disconnect display destroy listener even if xwayland didn't initialize
       xwayland: add set_geometry event
       backend/wayland: add touch support to the wayland backend
       xdg_shell: fix a typo
       xdg_shell: handle inert popups
 
 Isaac Freund (6):
       xdg-shell: split last-acked and current state
       layer-shell: add for_each_popup
       layer-shell: error on 0 dimension without anchors
       xdg_positioner: remove unused field
       wlr_drag: remove unused point_destroy field
       xwayland: remove unused listener
 
 Kenny Levinsen (2):
       session: Add libseat backend
       session: Add missing init to direct-freebsd
 
 Marten Ringwelski (1):
       backend/drm: Check if output is enabled before sending frame event
 
 Mykola Orliuk (5):
       backend/wayland: manage cursor for current pointer
       backend/wayland: factor out wlr_wl_seat
       backend/wayland: add error flow in create_wl_seat
       backend/wayland: fix input creation error handling
       backend/wayland: fix some keyboard/touch leaks
 
 Patrick Steinhardt (1):
       session: Don't refuse unprivileged creation of "direct" backend
 
 Roman Gilg (3):
       output-management-v1: add head identifying events
       output-management-v1: send head identifying information
       output-management-v1: send complete head state on enable change
 
 Ronan Pigott (1):
       virtual_pointer: remember current axis for axis events
 
 Rouven Czerwinski (2):
       examples: remove unnecessary gles2.h imports
       xwm: add loop detection for read_surface_parent
 
 Ryan Walklin (4):
       Implement logind session SetType method to change session type to wayland
       Also set XDG_SESSION_TYPE
       Don't set XDG_SESSION_TYPE unless logind SetType succeeds
       Quieten failure to set login session type
 
 Scott Moreau (2):
       xwm: Set _NET_WM_STATE_FOCUSED property for the focused surface
       foreign toplevel: Fix whitespace error
 
 Simon Ser (31):
       xwayland/xwm: don't insert surface in list on error
       xwayland/xwm: add prop count assert in xsurface_set_net_wm_state
       xwayland/xwm: use initializer for props in xsurface_set_wm_state
       render/gles2: make wlr_gles2_texture_from_* private
       render/gles2: keep ref to wlr_gles2_renderer in wlr_gles2_texture
       render/gles2: make push/pop debug functions take a wlr_renderer
       render/gles2: remove gles2_procs
       gamma-control-v1: fix use-after-free in gamma_control_handle_set_gamma
       examples/simple: use wlr_output_preferred_mode
       examples/simple: use wlr_renderer instead of GL
       Remove unnecessary wl_display_dispatch calls
       output: introduce wlr_output_event_commit
       output-power-management-v1: listen to output commit
       examples/dmabuf-capture: add extra roundtrip for wl_output listener
       backend/session/libseat: register log handler
       backend: remove check for _WAYLAND_DISPLAY
       backend/libinput: improve logger callback
       render: define EGL_NO_PLATFORM_SPECIFIC_TYPES (#2452)
       backend/drm: fix "a page-flip is already pending" errors on modeset
       xwayland: minor code style fixes
       xwayland: log unhandled NET_WM_STATE property changes
       gamma-control-v1: apply gamma LUT when output gets enabled
       screencopy: stop setting needs_frame flag
       backend/drm: export pending FB in export_dmabuf, if any
       output: update docs to reflect reality
       output: add when field to wlr_output_event_commit
       export-dmabuf: export DMA-BUF on output commit
       screencopy: perform DMA-BUF copy on output commit
       screencopy: send failed when copying a DMA-BUF with a region
       input-method: send modifiers in set_keyboard
       Update version to 0.12.0
 
 Tobias Langendorf (1):
       xwm: add support for xwayland minimize
 
 Tudor Brindus (11):
       examples: use `perror` instead of `fprintf` GNU %m `printf` extension
       xwayland: using %m in `wlr_log` is broken, use `wlr_log_errno` instead
       xwayland: fix use-after-free in selection handling
       xwayland: introduce WLR_XWAYLAND for specifying which Xwayland to use
       xwayland: remove stale transfers from the same requestor
       xwayland: notify requestor when we fail to respond to their request
       xwayland: fix minor typo in debug log
       types/wlr_keyboard: use bitmasks for wlr_keyboard_led and wlr_keyboard_modifier enums
       types/wlr_output_layout: use bitmask for wlr_direction
       util/edges: use bitmask for wlr_edges
       render/dmabuf: use bitmask for wlr_dmabuf_attributes_flags
 
 Valentin (2):
       Use fixed size integer type
       Fix undefined behavior
 
 nerdopolis (1):
       Accommodate for CONFIG_VT=0, all TTYs are in seat0, but not all seat0s have TTYs
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEENP+VJs/vDpejQOLkD9574OiPXkgFAl+n+t4ACgkQD9574OiP
 Xkg8TRAAopnm99XA7TE3w0UEDhXUBvlWB05fS6M4wiSNXjMp1ENW0O7PGtIbZt1Y
 /mbJQ8yAXbT0i5X7aE6iKTW8GjHoWpwaYCL3BrDb8A8Hl2s04pxSiLL2JMbHyb02
 KsCjZSbCBGldmgYOaJZl9SM5TDSyYo8xwGprkRiqK8Nz/SL75+sR4Jf/iMfaP1Rx
 qu2o87z3B1DEX+dvf0UaStJSmAb5sBmEW0X8sj8jf6Iubwsxy0BjI00AoTa2TS7k
 U1h3QuHqFy65pVg9Hwe5jPsoKVN5UqFzZNFja+91fXcjohm4gRkrnPZHCXijAl5E
 +sNSkY0SjO1ci4KSRXRTzD9X7HfA2f4yGjDEjoKorop7kUVAHQeKfFbbrKEjoYao
 aJLCFCNjT2ednZJhteYXKEodYfQov6AEirPJtw+UEDe8JgLSDZJZtXnBXKBXEeFa
 BgEzkoQiKqA4J3ToEj2fWrNMLkjfnc99vGn3tso9wfVB93sfg8lX1L9BI9CklGuD
 je6inBDRTa/RmALe1IGE4Y2PwrlmtQqHVjqDKv5MDpy65ffuYS3bH18fSLTW2cWY
 zYQmFOuj1VHxqT1noKAqTeowR691KC7JmAG2RjOZK2huP1xkijdaOVCA4bWlEqS3
 zld5pUUJ4k30UJmJIUK1Vp9eCStnPvxti1ngfuLHZ6WCe/jT8Os=
 =2poj
 -----END PGP SIGNATURE-----

Merge tag '0.12.0' into color-profiles

wlroots 0.12.0

Antonin Décimo (3):
      Fix typos
      Fix incorrect format parameters
      xwayland: free server in error path

Daniel De Graaf (1):
      wlr_virtual_keyboard: fix fd leak

Daniel Kondor (2):
      foreign-toplevel-management: report parent toplevel
      foreign toplevel: send parent event only to clients that support it

Devin J. Pohly (1):
      drm: fix uninitialized read

Drew DeVault (1):
      Remove xdg-shell v6

Guido Cella (1):
      render: Don't crash on 0 dimensions

Ilia Bozhinov (9):
      xwayland: do not allow apps to change focus after wlroots request
      make sure to fail setting gamma on disabled outputs
      backend/wayland: destroy relative pointer when output is disconnected
      wayland: emit relative pointer events only for current pointer
      xwayland: disconnect display destroy listener even if xwayland didn't initialize
      xwayland: add set_geometry event
      backend/wayland: add touch support to the wayland backend
      xdg_shell: fix a typo
      xdg_shell: handle inert popups

Isaac Freund (6):
      xdg-shell: split last-acked and current state
      layer-shell: add for_each_popup
      layer-shell: error on 0 dimension without anchors
      xdg_positioner: remove unused field
      wlr_drag: remove unused point_destroy field
      xwayland: remove unused listener

Kenny Levinsen (2):
      session: Add libseat backend
      session: Add missing init to direct-freebsd

Marten Ringwelski (1):
      backend/drm: Check if output is enabled before sending frame event

Mykola Orliuk (5):
      backend/wayland: manage cursor for current pointer
      backend/wayland: factor out wlr_wl_seat
      backend/wayland: add error flow in create_wl_seat
      backend/wayland: fix input creation error handling
      backend/wayland: fix some keyboard/touch leaks

Patrick Steinhardt (1):
      session: Don't refuse unprivileged creation of "direct" backend

Roman Gilg (3):
      output-management-v1: add head identifying events
      output-management-v1: send head identifying information
      output-management-v1: send complete head state on enable change

Ronan Pigott (1):
      virtual_pointer: remember current axis for axis events

Rouven Czerwinski (2):
      examples: remove unnecessary gles2.h imports
      xwm: add loop detection for read_surface_parent

Ryan Walklin (4):
      Implement logind session SetType method to change session type to wayland
      Also set XDG_SESSION_TYPE
      Don't set XDG_SESSION_TYPE unless logind SetType succeeds
      Quieten failure to set login session type

Scott Moreau (2):
      xwm: Set _NET_WM_STATE_FOCUSED property for the focused surface
      foreign toplevel: Fix whitespace error

Simon Ser (31):
      xwayland/xwm: don't insert surface in list on error
      xwayland/xwm: add prop count assert in xsurface_set_net_wm_state
      xwayland/xwm: use initializer for props in xsurface_set_wm_state
      render/gles2: make wlr_gles2_texture_from_* private
      render/gles2: keep ref to wlr_gles2_renderer in wlr_gles2_texture
      render/gles2: make push/pop debug functions take a wlr_renderer
      render/gles2: remove gles2_procs
      gamma-control-v1: fix use-after-free in gamma_control_handle_set_gamma
      examples/simple: use wlr_output_preferred_mode
      examples/simple: use wlr_renderer instead of GL
      Remove unnecessary wl_display_dispatch calls
      output: introduce wlr_output_event_commit
      output-power-management-v1: listen to output commit
      examples/dmabuf-capture: add extra roundtrip for wl_output listener
      backend/session/libseat: register log handler
      backend: remove check for _WAYLAND_DISPLAY
      backend/libinput: improve logger callback
      render: define EGL_NO_PLATFORM_SPECIFIC_TYPES (#2452)
      backend/drm: fix "a page-flip is already pending" errors on modeset
      xwayland: minor code style fixes
      xwayland: log unhandled NET_WM_STATE property changes
      gamma-control-v1: apply gamma LUT when output gets enabled
      screencopy: stop setting needs_frame flag
      backend/drm: export pending FB in export_dmabuf, if any
      output: update docs to reflect reality
      output: add when field to wlr_output_event_commit
      export-dmabuf: export DMA-BUF on output commit
      screencopy: perform DMA-BUF copy on output commit
      screencopy: send failed when copying a DMA-BUF with a region
      input-method: send modifiers in set_keyboard
      Update version to 0.12.0

Tobias Langendorf (1):
      xwm: add support for xwayland minimize

Tudor Brindus (11):
      examples: use `perror` instead of `fprintf` GNU %m `printf` extension
      xwayland: using %m in `wlr_log` is broken, use `wlr_log_errno` instead
      xwayland: fix use-after-free in selection handling
      xwayland: introduce WLR_XWAYLAND for specifying which Xwayland to use
      xwayland: remove stale transfers from the same requestor
      xwayland: notify requestor when we fail to respond to their request
      xwayland: fix minor typo in debug log
      types/wlr_keyboard: use bitmasks for wlr_keyboard_led and wlr_keyboard_modifier enums
      types/wlr_output_layout: use bitmask for wlr_direction
      util/edges: use bitmask for wlr_edges
      render/dmabuf: use bitmask for wlr_dmabuf_attributes_flags

Valentin (2):
      Use fixed size integer type
      Fix undefined behavior

nerdopolis (1):
      Accommodate for CONFIG_VT=0, all TTYs are in seat0, but not all seat0s have TTYs
2021-01-21 17:39:54 +01:00
Guido Cella
6949d0fd38 render: Don't crash on 0 dimensions
Don't force compositors to check when an empty shape is being renderered.
References #2282. This was motivated by dwl crashing when setting window
borders to 0 (djpohly/dwl#51).
2020-08-27 17:39:31 +02:00
Devin Bayer
1c0643d800 color mgmt: bug fixes 2020-08-03 11:25:09 +02:00
Devin Bayer
10bf68b928 color management 2020-07-29 16:45:29 +02:00
Simon Ser
315bf08733 render: add wlr_render_subtexture_with_matrix
This renders only a subset of the texture, instead of the full texture.
2020-06-17 09:10:54 -06:00
Rouven Czerwinski
d3d1bac1c2 render: assert sane values for box functions
Width and height should always be > 0 for render functions which take a
wlr_box.

References https://github.com/swaywm/wlroots/issues/2281
2020-06-16 15:16:02 +02:00
Andri Yngvason
b64a8a7f98 render: Add wlr_renderer_blit_dmabuf() 2020-06-08 20:49:41 +02:00
Simon Ser
d10f8a98ec render: only expose linux-dmabuf if EGL extension is supported
Only expose linux-dmabuf extension if EGL_EXT_image_dmabuf_import_ext is
supported.

Closes: https://github.com/swaywm/wlroots/issues/2076
2020-04-09 00:16:03 +00:00
Isaac Freund
c682d97841 Return failure of wlr_renderer_init_wl_display()
This makes it easier for the user of this library to properly handle
failure of this function.

The signature of wlr_renderer_impl.init_wl_display was also modified to
allow for proper error propagation.
2020-03-23 15:19:16 +01:00
Simon Ser
346b43e937 render: guard rendering operations between begin() and end()
Add a wlr_renderer.rendering bool, set it to true between
wlr_renderer_begin() and wlr_renderer_end(). Assert we're rendering when
calling functions that render.
2019-12-31 08:07:44 -07:00
emersion
e42178d03f
render: switch wlr_renderer to wlr_drm_format_set 2019-04-01 19:18:04 +03:00
Ilia Bozhinov
fb5691b6cc output: add wlr_output_preferred_read_format()
The read format is dependent on the output, so we first need to make it
current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf
client would cause EGL_NO_SURFACE to be bound at the time when
screencopy needs to query for the preferred format, causing GL errors.
2018-11-24 10:54:25 +01:00
emersion
09550032b7
render: correctly set EGL_RENDERABLE_TYPE
This should be set to EGL_OPENGL_ES2_BIT.

Also fixes EGL config attributes in the headless and X11 backends.
2018-11-10 13:20:54 +01:00
emersion
62d646f2b8
render/gles2: remove assumptions about supported formats
We were assuming GL_BGRA_EXT was always supported.

We now check that it's supported for rendering. We fail if it isn't because
this format is specified as "always supported" by the Wayland protocol.

We also check if it's supported for reading pixels. A new preferred_read_format
function returns the preferred format that can be used to read pixels. This is
used by the screencopy protocol.
2018-11-04 09:00:51 +01:00
emersion
2f0815838d Init dmabuf global in renderer 2018-09-02 08:50:43 +02:00
emersion
7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion
2b9cbaddf3
screencopy: add support for frame flags 2018-06-30 22:18:03 +01:00
Dominique Martinet
4cc4412481 wlr_renderer_destroy: fix renderer NULL check
renderer is checked for NULL, but was dereferenced before that.

Found through static analysis
2018-06-30 11:38:21 +09:00
emersion
135721118a
render: remove wlr_renderer_check_import_dmabuf
It's possible to implement it outside the renderer, by creating a
texture and destroying it right away. This reduces the API surface
of the renderer.
2018-05-30 17:08:15 +01:00
emersion
28020ff577
Only allow one modifier per DMA-BUF, split attributes struct in render/ 2018-05-30 09:29:12 +01:00
emersion
6eb4b5b54d
Merge pull request #993 from emersion/bind-wl-drm-in-renderer
render: bind wl_drm in renderer
2018-05-25 13:54:16 +01:00
Ilia Bozhinov
24cf70ae96 backends: implement custom EGL and renderer initialization
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.

Fixes #987
2018-05-25 14:56:52 +03:00
emersion
41130fe54b
render: bind wl_drm in renderer 2018-05-21 19:07:08 +01:00
emersion
449f06556a
Destroy wlr_surface with wlr_renderer 2018-04-26 00:11:36 +01:00
Rostislav Pehlivanov
12298ce88c Do not advertize *RGB8888 as supported shm formats
They're always available and supported, and are added automatically.
Adding them again just duplicates them.
2018-04-21 14:58:25 +01:00
emersion
70d820be25
Add wlr_renderer_init_wl_shm to advertize supported renderer formats 2018-04-20 23:58:30 +01:00
emersion
d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -04:00
emersion
adf4fb08dd
Merge branch 'master' into texture-redesign 2018-03-26 19:13:13 -04:00
emersion
793c3b3047
render: add simple functions to render rectangles and ellipses 2018-03-26 12:41:51 -04:00
emersion
c63d94483b
Redesign wlr_texture
- Textures are now immutable (apart from those created from raw
  pixels), no more invalid textures
- Move all wl_drm stuff in wlr_renderer
- Most of wlr_texture fields are now private
- Remove some duplicated DMA-BUF code in the DRM backend
- Add more assertions
- Stride is now always given as bytes rather than pixels
- Drop wl_shm functions

Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-24 23:48:32 -04:00
emersion
3581573bdc
render/gles2: make wlr_renderer_begin take viewport size
This allows raw GL calls outside wlr_renderer to be removed.
2018-03-21 07:37:09 +01:00
emersion
95e86e675a
render/gles2: remove global state, use OpenGL debug extension 2018-03-20 19:14:33 +01:00
emersion
c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h 2018-03-19 23:16:29 +01:00
emersion
876f07e9f1
renderer: replace wlr_texture_get_matrix by wlr_render_texture 2018-03-15 19:31:02 +01:00
emersion
824a95ad19
matrix: use 2D matrices 2018-03-15 15:33:58 +01:00
emersion
d26b67cb06
matrix: unify API, don't use array pointers 2018-03-15 11:10:56 +01:00
Guido Günther
d08792bfff Add alpha to wlr_render_with_matrix
so we can use the alpha channel to e.g. blend in textures
2018-02-25 13:47:48 +01: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
ddb1779f9f
render: make wlr_renderer_clear take a float[4] for the color 2018-02-03 09:32:02 +01:00
emersion
51c22d39a4
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-29 23:24:09 +01:00
emersion
4fa90b0511
Backport screenshooter fixes from the renderer redesign v1
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
2018-01-23 22:06:54 +01:00
emersion
415a2b7c56
render: add wlr_renderer_clear and wlr_renderer_scissor 2018-01-22 16:42:22 +01:00
emersion
0ce3135304
Move read_pixels from output to renderer 2017-10-08 02:11:56 +02:00
Dominique Martinet
f24b3df980 wlr renderer/texture: rename init to create when it does alloc 2017-08-19 08:33:31 +02:00
Dominique Martinet
4bbf718e7d impl->destroy cleanup:
- remove trivial destroy() function
 - make sure we check impl and impl->destroy before calling
 - always call free if not implemented
2017-08-14 16:22:31 +02:00
Drew DeVault
2facf1df65 Fix software cursors 2017-08-14 08:43:17 -04:00
Drew DeVault
de6f32c84e Refactor away wlr_renderer_state 2017-08-14 08:37:50 -04:00
Drew DeVault
c24351681f Refactor EGL handling 2017-08-10 22:15:37 -04:00