random human
42ffa413fb
relative_pointer: add relative-pointer example
...
On left mouse button click, locks the cursor and renders relative motion
events.
6 years ago
Ilia Bozhinov
16175751d6
examples: add wlr_foreign_toplevel_management_v1 example
6 years ago
emersion
a8bc8c65ce
examples: only link clients to wlroots if necessary
6 years ago
emersion
2d0c5ec78e
Use _POSIX_C_SOURCE, use shm_open
6 years ago
sghctoma
1d7cc1b38b
Add epoll-shim dependency on FreeBSD
...
On FreeBSD, epoll is provided as a 3rd-party library, so it needs to be
added as a dependency.
6 years ago
Cole Mickens
7297348736
render: fix meson including libdrm
6 years ago
Scott Anderson
7ca3bc1d6f
Fix libdrm includes
...
This removes any assumptions about how the libdrm headers are installed,
and uses the pkg-config include directories as we're "supposed to".
This only adds a partial dependency, since we don't actually need to
link against libdrm.
6 years ago
Drew DeVault
b99da405e7
Assert read return value in examples/input-method
6 years ago
Dorota Czaplejewicz
cec7471119
wlroots: add basic support for zwp_input_method_v2
...
Implemented basic input method functionality. Not included: popups, grabbing.
6 years ago
Dorota Czaplejewicz
427735fcd9
wlroots: add support for zwp_text_input_unstable_v3
6 years ago
Drew DeVault
5e9959daaa
Merge pull request #852 from Laaas/master
...
Implement pointer-constraints-unstable-v1 protocol
6 years ago
emersion
e3736d4acc
examples/pointer-constraints: style fixes
6 years ago
emersion
9622efd6db
Fix unknown cursor in layer-shell example
6 years ago
emersion
3df602a62d
export-dmabuf: disable hardware cursors if desired
...
Also make the frame resource inert when sending "ready".
6 years ago
Las
fa2e6e7d9d
Implement pointer-constraints protocol in wlroots and rootston
6 years ago
random human
6af77e3d9e
Release pointers in examples/multi-pointer
6 years ago
random human
de16defb21
Release registry pointer in examples/idle
6 years ago
random human
ef5df78a27
Destroy layout after display in examples/output-layout
6 years ago
random human
7105864e13
Handle setting keymap in examples more securely
6 years ago
random human
8589ae19de
Fix bugs listed by clang's static analyzer
...
A few pedantic changes and unused variables (1-4), and genuine bugs (5,
6).
The reports with the corresponding files and lines numbers are as
follows.
1. backend/libinput/tablet_pad.c@31,44,57
"Allocator sizeof operand mismatch"
"Result of 'calloc' is converted to a pointer of type 'unsigned int',
which is incompatible with sizeof operand type 'int'"
2. types/tablet_v2/wlr_tablet_v2_pad.c@371
"Allocator sizeof operand mismatch"
"Result of 'calloc' is converted to a pointer of type 'uint32_t', which
is incompatible with sizeof operand type 'int'"
3. types/wlr_cursor.c@335
"Dead initialization"
"Value stored to 'dx'/'dy' during its initialization is never read"
4. rootston/xdg_shell.c@510
"Dead initialization"
"Value stored to 'desktop' during its initialization is never read"
5. types/tablet_v2/wlr_tablet_v2_pad.c@475
"Dereference of null pointer"
"Access to field 'strips' results in a dereference of a null pointer
(loaded from field 'current_client')"
The boolean logic was incorrect (c.f. the check in the following
function).
6. examples/idle.c@163,174,182
"Uninitialized argument value"
"1st function call argument is an uninitialized value"
If close_timeout != 0, but simulate_activity_timeout >= close_timeout,
the program would segfault at pthread_cancel(t1).
6 years ago
random human
660a022909
Fixes examples/dmabuf-capture being built with unmet dependencies
...
Even if the libav* variables were disabler objects, the build targer
dmabuf-capture was being built. Modified the script to support a generic
solution.
6 years ago
Scott Anderson
fd3fa760d3
Revert "Revert "Merge pull request #1194 from ascent12/meson_feature""
...
This reverts commit 9c886f20b9
.
6 years ago
Drew DeVault
9c886f20b9
Revert "Merge pull request #1194 from ascent12/meson_feature"
...
This breaks wlroots when used as a meson subproject.
This reverts commit dea311992e
, reversing
changes made to 6db9c4b746
.
6 years ago
Scott Anderson
584a3f8b6e
Update examples to use new option
...
We use a dictionary to remove some code duplication.
6 years ago
emersion
f86f1daf9a
Fix build on FreeBSD
6 years ago
emersion
2ae0575631
examples/gamma-control: fix brightness formula
6 years ago
emersion
b0c32019c3
examples/gamma-control: clamp values, default brightness to 1
6 years ago
emersion
1d97202ec2
examples: add gamma-control
6 years ago
Drew DeVault
5642c5cc8f
Merge pull request #1053 from emersion/xdg-decoration
...
Add xdg-decoration-unstable-v1 support
6 years ago
emersion
d4181c5a7a
examples: cleanup simple
...
- Move a log to where it should be
- Enforce code style
- Rename wlr to backend
6 years ago
emersion
555721f714
Add xdg-decoration-unstable-v1 support
6 years ago
Markus Ongyerth
d9e978e1b3
rename wlr_tablet_tool to wlr_tablet
...
The previous naming was based on the input-device capability names from
libinput.
With code that uses the libinput_tablet_tool and mapping into tablet-v2,
this is confusing, so the name is changed to follow the names used in
the protocol.
6 years ago
emersion
7cbef15206
util: add wlr_ prefix to log symbols
6 years ago
emersion
a7a96d7644
examples/screencopy: use libpng
6 years ago
emersion
c421700f3d
screncopy: update protocol
6 years ago
emersion
2b9cbaddf3
screencopy: add support for frame flags
6 years ago
emersion
bd8be19b79
screencopy: add presentation timestamp
6 years ago
emersion
73755ad348
screencopy-v1: add basic implementation
6 years ago
Scott Anderson
0e19b024c6
Add minimum version for ffmpeg 4.0 libraries
7 years ago
Scott Anderson
86942d8a6a
Check for libavutil/hwcontext_drm.h
...
This is an optional feature of libavutil, so this will cause a build
failure if it's not present (e.g. on Debian/Ubuntu).
7 years ago
Rostislav Pehlivanov
5707653e85
examples/dmabuf-capture: move encoding to a separate thread
...
Drop new frames if too slow. Speeds up encoding significantly, even with vaapi.
7 years ago
Rostislav Pehlivanov
ed7d5b0f53
Fix example
7 years ago
emersion
bd0c1b7949
export-dmabuf: update protocol
7 years ago
Rostislav Pehlivanov
9eddcbc376
Update example and protocol
7 years ago
emersion
21928cbe61
Merge branch 'master' into screencontent
7 years ago
Genki Sky
d1cf9acbd5
cleanup: Use void for zero-parameter functions
...
Signed-off-by: Genki Sky <sky@genki.is>
7 years ago
emersion
8c9d0f15ce
Merge pull request #1017 from tobiasblass/examples_rotation_fix_doublefree
...
Fix double-free in the rotation.c example.
7 years ago
emersion
0c1f50168b
examples/output-layout: destroy wl_display
...
Thanks @tobiasblass for pointing this out. See #1017 .
7 years ago
Tobias Blass
a21894a844
Fix double-free in the tablet.c and touch.c examples
...
The wl_display_destroy function already destroys the backend's renderer.
Freeing it by hand causes a segmentation fault.
7 years ago
Tobias Blass
75f9feb6de
Fix double-free in the rotation.c example.
...
The wl_display_destroy function already destroys the backend's renderer.
Freeing it by hand causes a segmentation fault.
7 years ago
emersion
70d324a0f9
examples/dmabuf-capture: simplify event loop and fix style
7 years ago
emersion
85b6b4b0c8
examples/dmabuf-capture: make building this example optional
7 years ago
emersion
2198fd5eed
examples/dmabuf-capture: fix indentation
7 years ago
Rostislav Pehlivanov
f204a9127c
Command line parsing
7 years ago
Rostislav Pehlivanov
b9b397ef80
Add a demo client for dmabuf export
7 years ago
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
7 years ago
Tony Crisci
a078e50ec0
rename sample state to "state"
7 years ago
Tony Crisci
e9fab2cc70
pointer example: use xcursor manager
7 years ago
Tony Crisci
aedd3c6d46
make pointer show up in pointer example
7 years ago
Timidger
9a1d0e42d2
Fixed emersion's issues
7 years ago
Timidger
7da50d065b
Fixed style issues
7 years ago
Timidger
7f1230fe78
Remvoed unnecessary wayland socket in examples
7 years ago
Timidger
167ca57b18
Fixed up building examples
7 years ago
Timidger
583654405f
Made output layout example standalone
7 years ago
Timidger
8fd25cbc5b
Fixed indentation
7 years ago
Timidger
b3ca73c0ac
Multi-pointer ported over
7 years ago
Timidger
b510c0f6c2
Made rotation example standalone
7 years ago
Timidger
7be5dfecc0
Made tablet standalone
7 years ago
Timidger
c622a0c7fb
Made touch standalone
...
TODO test
7 years ago
Timidger
4c1d74ef91
Made examples/pointer standalone
7 years ago
Timidger
7284709370
simple now works on DRM
7 years ago
Timidger
44b2bf18f0
Can now quit the simple example
7 years ago
Timidger
b98779a674
Got simple working without keyboard input
7 years ago
Timidger
ad6d40c7c6
Moved cat out of support, removed support
7 years ago
emersion
eaed6bd03b
render/egl: add wlr_egl_destroy_surface
7 years ago
Guido Günther
67a10cc1f6
examples/layer-shell: take an explicit grab on the popup
...
This demonstrates popups can be closed by clicking on the area outside
the popup and parent.
7 years ago
Guido Günther
32e043f996
examples: Allow to close the popup
...
So we can the xdg_popup_destroy path.
7 years ago
Guido Günther
5209c79702
examples: Handle input entering popup in layer-shell
...
Change the cursor when entering the popup and make mouse buttons change
the red component of the square. This makes sure we can handle input
correctly.
7 years ago
Guido Günther
421652a450
examples: Animate popup in layer-shell
7 years ago
Guido Günther
d1e82a8ede
examples: Drop unused variable
7 years ago
Drew DeVault
941f88ce23
Fix popup positioning & double popups
7 years ago
Drew DeVault
0a0627f5d0
Finish forward-porting @acrisci's positioner work
7 years ago
Drew DeVault
2e3d901ac5
Forward-port xdg-shell-v6 positioner improvements
7 years ago
Drew DeVault
d3cdb00208
Add (shitty) support for popups to layer example
7 years ago
Drew DeVault
4575f27932
Update layer shell example -o behavior
7 years ago
Dominique Martinet
555206cf60
Fix gcc string truncation warnings
7 years ago
Drew DeVault
902d859c67
Fix syntax errors
...
Build before you commit, dumbass
7 years ago
Drew DeVault
7bb8512afb
Fix assertions with side-effects
...
Fixes #1725
7 years ago
Drew DeVault
3a8c7f283d
Add input-inhibitor example client
7 years ago
Drew DeVault
a94f4d0edc
Always give keyboard focus to the topmost layer
7 years ago
Drew DeVault
883d8d306c
Identify topmost interactive layer surface
7 years ago
emersion
f63a5d881d
examples: get wlr_renderer from the backend
7 years ago
emersion
33a2eb4b77
Untie wlr_backend from wlr_renderer
7 years ago
Drew DeVault
2053a4c144
Add more exotic cursor for layer shell example
...
So it's more obvious that it's being set
7 years ago
Drew DeVault
746e3759b7
Address review feedback
7 years ago
Drew DeVault
168f65fb7a
Minor bugfixes
7 years ago
Drew DeVault
e3eb487dc2
Add pointer support to layer shell example
7 years ago
Drew DeVault
ac219cbda6
Remove width_mm from tablet events
7 years ago
Drew DeVault
324b9d910d
Remove width_mm from wlr_touch events
7 years ago
Drew DeVault
a35a5786b0
Remove width_mm from wlr_pointer events
7 years ago
Tony Crisci
330ee08126
Merge pull request #744 from emersion/texture-redesign
...
Redesign wlr_texture
7 years ago
Drew DeVault
13edb19a6c
Fix issue starting up client EGL on X11 backend
7 years ago
Drew DeVault
776b81d499
Fix surface layer damage tracking
7 years ago
Drew DeVault
0e318df13d
Add margin animation to the example demo
7 years ago
Drew DeVault
86ca4bea6d
Fix layer rendering/layout bugs
7 years ago
Drew DeVault
df9dbf3170
Fix rebase issues; rearrange layers on destroy
7 years ago
Drew DeVault
d1c0e6fe2c
Add layer_surface.close
7 years ago
Drew DeVault
b73c4f48c1
Fix exclusive zone among other layers
7 years ago
Drew DeVault
0f7e78f6aa
Fix issue with multiple outputs in layer example
7 years ago
Drew DeVault
f444a0d14c
Implement layer surface damage
7 years ago
Drew DeVault
4bf936360d
Arrange & render layer surfaces
7 years ago
Drew DeVault
fcf8c6c8a2
Fix issues preventing layer from getting allocated
...
Now all of the steps to get rootston a reference to the layer surface
are correctly wired up.
7 years ago
Drew DeVault
4bc1cc49d5
Fix strcmp use
7 years ago
Drew DeVault
b31ce4220c
Add broken test client and rootston stubs
7 years ago
emersion
adf4fb08dd
Merge branch 'master' into texture-redesign
7 years ago
emersion
793c3b3047
render: add simple functions to render rectangles and ellipses
7 years ago
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.
7 years ago
emersion
3581573bdc
render/gles2: make wlr_renderer_begin take viewport size
...
This allows raw GL calls outside wlr_renderer to be removed.
7 years ago
emersion
c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h
7 years ago
Drew DeVault
1956d3cedb
Merge pull request #722 from emersion/matrix-redesign
...
Matrix redesign
7 years ago
emersion
876f07e9f1
renderer: replace wlr_texture_get_matrix by wlr_render_texture
7 years ago
emersion
824a95ad19
matrix: use 2D matrices
7 years ago
emersion
d26b67cb06
matrix: unify API, don't use array pointers
7 years ago
emersion
b6a3f240c7
matrix: move to types/
7 years ago
emersion
3bd1d876ae
examples: simplify screenshot client
7 years ago
Drew DeVault
bfc0e95d2c
Add mode support to libinput backend
...
And extend tablet example with tilt and ring support
7 years ago
Drew DeVault
3296365ce5
Merge pull request #659 from agx/alpha
...
Make wlr_render_with_matrix use alpha
7 years ago
Guido Günther
d08792bfff
Add alpha to wlr_render_with_matrix
...
so we can use the alpha channel to e.g. blend in textures
7 years ago
Drew DeVault
9dc868a27f
Merge pull request #667 from Ongy/screenshot_tmpfile_template
...
prevent screenshot from resuing template array
7 years ago
Markus Ongyerth
8ab0073b49
prevent screenshot from resuing template array
...
The template array given to mkstemp was declared static. This reused the
memory, which caused mkstemp to fail if backingfile is run more than
once, because the array no longer contained the template syntax
(which is forced to end in XXXXXX) but the previous file name.
7 years ago
Tony Crisci
b7b86a9591
Merge pull request #641 from Ongy/idle-inhibit
...
Add idle-inhibit implementation
7 years ago
Markus Ongyerth
67285c1d57
idle-inhibit: style adjustments and motivation
7 years ago
Guido Günther
b13f9fcfde
Don't use os_create_anonymous_file outside of wlroots
...
Use a stripped down version for the backing file in the screenshot
example.
7 years ago
Markus Ongyerth
87a7afb641
idle-inhibit: second feedback pass
7 years ago
Markus Ongyerth
3016133f91
idle-inhibit: feedback pass
7 years ago
Markus Ongyerth
bab8c73d3c
handle xdg close event in idle-inhibit example
...
Fixes a crash when the idle-inhibit example application is closed by the
compositor, instead of Ctr+C on the spawning terminal, by actualy
handling the close request.
7 years ago
Markus Ongyerth
a0bce86006
adds the client example for idle-inhibit
...
Adds a client example for the idle-inhibit-unsable-v1 protocol.
The client creates a surface and requests an idle inhibitor.
On pointer BTN_LEFT the inhibitor is destroyed if it exists, or
recreated if it was destroyed before.
The surfaces colour is based on the idle-inhibit state.
Green if an inhibitor exists, yellow if it does not.
7 years ago
Dominique Martinet
d1b28ec812
wayland protocol headers: use double-quote for includes
...
These headers are not installed so we should look for these locally
7 years ago
emersion
10ecf871f2
Remove wlr_backend.events.{output_remove,device_remove}
7 years ago
emersion
ddb1779f9f
render: make wlr_renderer_clear take a float[4] for the color
7 years ago
emersion
3d3ea32137
Merge remote-tracking branch 'upstream/master' into output-damage
7 years ago
Markus Ongyerth
cd925f496c
fixes the off by one errors in examples/screenshot
...
The inverse loop iterations for the transformed outputs had an off by
one error, iterating 1 based, not 0 based. This commit fixes that.
7 years ago
Markus Ongyerth
3a404e4f8d
handle the other transformations for screenshots
...
This handles all current transformations for outputs properly.
This ensures an output is drawn in readable orientation/flipping no
matter the actual transformations applied to it.
7 years ago
Markus Ongyerth
4afc933ea4
fixes 90 degree rotation screenshots
...
This fixes the screenshot example application when an output is rotated
by 90 degrees.
Other tranformations are not taken into account yet.
7 years ago
emersion
51c22d39a4
Merge remote-tracking branch 'upstream/master' into output-damage
7 years ago
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.
7 years ago
emersion
415a2b7c56
render: add wlr_renderer_clear and wlr_renderer_scissor
7 years ago
emersion
59c53e8333
Merge remote-tracking branch 'upstream/master' into output-damage
7 years ago
Johannes Schramm
dcc743047b
style: include brackets for if/while/for, even if it's a single statement
7 years ago
emersion
0365b587f0
output: add damage tracking via buffer age
7 years ago
emersion
e29a0df8c1
output: fix software cursors damage tracking
7 years ago
Drew DeVault
bcb58b5caa
Merge pull request #567 from Timidger/example-logging
...
Fixed logging for examples
7 years ago
Timidger
264ef0c261
Fixed logging for examples
7 years ago
Drew DeVault
b331c5c2c5
Merge pull request #549 from emersion/output-enabled
...
Add wlr_output::enabled
7 years ago
Heghedus Razvan
9e85283f06
Add example for idle protocol
...
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
7 years ago
emersion
8ebd7d4dbe
output: rename resolution event to mode
7 years ago
emersion
1fe1d64042
Fix views outside output layout
7 years ago
Timidger
56505c2635
Don't destroy backend in compositor_fini
...
This is already done after the changes in #504 , and now just causes a
segfault on closing the examples.
7 years ago
Drew DeVault
bb24895a2b
Merge pull request #533 from martinetd/wl_array_add
...
ENOMEM checks: consistently check wl_array_add return
7 years ago
Dominique Martinet
8e24aaa3c6
style: fix sizeof() calls without parentheses
7 years ago
emersion
1e6566e6cd
Fixes for multiple outputs
...
* Fixes output positions in screenshots
* Fixes Wayland backend pointer events when output layout doesn't start at (0, 0)
7 years ago
Björn Esser
ff13849624
config: Avoid clash with other config-headers
7 years ago
Björn Esser
57a09c8ca4
config: Put all defines into config.h
7 years ago
emersion
3b4b8953d9
Update output layout when scale or transform changes
7 years ago
Moritz
cef6d75491
Moved os-compatibility and added header
...
* Moved os-compatibility.c to util
* Added header under util
* Removed static since it isn't needed (i think so)
* Adjusted meson.build to include lib_wlr
Improved some codestyle
* Added guard to os-compatibility.h
* Fixed typo in include statment
Adjusted Guard
* Changed guard to _WLR_UTIL_OS_COMPATIBILITY
7 years ago
emersion
64221c6da1
Use wl_list for touch points in examples/
7 years ago
Tony Crisci
f61986e8db
rename touch slot to touch id
7 years ago
emersion
ac1573b0e7
Add scale parameter to wlr_cursor_set_image
7 years ago
Tancredi Orlando
029f2c05bb
Fix unused-result error
7 years ago
Drew DeVault
4f73498b78
Move shared example code
7 years ago
emersion
6b6895168b
Fix segfaults on exit in examples/mutli-pointer
7 years ago
emersion
7dc716a2bb
Fix memory leak in wlr_cursor
7 years ago
emersion
ae9a46fc9b
Remove outdated TODOs, use wlr_surface_has_buffer
7 years ago
emersion
6a74a3586f
Fix wlr_cursor_destroy, handle device remove in examples/multi-cursor
7 years ago
emersion
044173d1df
Add multi-pointer example
7 years ago
emersion
4230a577cc
Remove wlr_cursor_set_xcursor for now
7 years ago
emersion
2e2d63a164
Manage wlr_output_cursor from wlr_cursor
7 years ago
emersion
c45f2eef0e
Fix rootston
7 years ago
Tony Crisci
875a5b446f
remove time usec
7 years ago
Timidger
a299b9d875
Fixes #321 , not using result of wl_container_of
7 years ago
emersion
e1d213fccd
Create globals only for enabled outputs in DRM backend
7 years ago
Drew DeVault
c5fff08f8a
Forgot to rename these
7 years ago
Drew DeVault
16f35ecbea
Merge branch 'master' into heghe/wl_list
7 years ago
Drew DeVault
169b68b17c
Rename remaining refs to wlr_list
7 years ago
emersion
c8570d0e42
Remove wl_list_init when using wl_signal_add
7 years ago
Heghedus Razvan
e1f196a3e9
Replace list_t with wl_list for wlr_input_device
...
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
7 years ago
Heghedus Razvan
1d716241af
Replace list_t with wl_list in wlr_output
...
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
7 years ago
Greg V
a5fe9aa736
Add FreeBSD compatibility
7 years ago
emersion
55c063f440
Remove examples/compositor.c, re-added by mistake
7 years ago
emersion
e4a8831bf1
Fix GCC build
7 years ago
emersion
c9909a45ab
Code style
7 years ago
emersion
63af97800f
Use ImageMagick to write PNG screenshot
7 years ago
emersion
a87f016017
Remove cairo dependency, write raw pixels
7 years ago
emersion
d4cc82f11a
Call glReadPixels right before swapping buffers
7 years ago
emersion
35f9700251
First attempt to implement screenshooter
7 years ago
emersion
1c8b72e0cd
Add screenshooter skeleton
7 years ago
Versus Void
641d08ce7e
Transform hotspot with cursor
...
Fix #188
7 years ago
Versus Void
e88f3887ca
Move wlr-example.ini.example to rootston.ini.example and reference it from examples' config parser
7 years ago
Versus Void
84de02986a
Add examples/wlr-example.ini.example with option descriptions for examples
7 years ago
Drew DeVault
aa8a4f12b7
Fix keyboard handling in examples
7 years ago