Skip to content

[WIP] Wayland #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
60cface
Snake and gradient examples
versionpatch Jun 8, 2022
953d84a
Implemented wl_surface.c
versionpatch Jun 13, 2022
cdc804e
Wayland backend
versionpatch Jun 14, 2022
10135a0
Made surface object store a pointer to the SHM object to avoid needin…
versionpatch Jun 15, 2022
5282488
Wayland mouse and keyboard support.
versionpatch Jun 15, 2022
f45952f
Implemented window hiding. Fixed some formatting issues.
versionpatch Jun 15, 2022
03eb44e
Simple client side decoration setup
versionpatch Jun 16, 2022
a0c474d
Decoration title rendering
versionpatch Jun 17, 2022
acd94b2
Refactored some parts common between surface and decoration
versionpatch Jun 17, 2022
59c2556
Added close button
versionpatch Jun 17, 2022
51eae1b
Resize WIP
versionpatch Jun 21, 2022
fe0ff2d
Fixed resize memory problems
versionpatch Jun 21, 2022
3df780b
Decorations react to resize
versionpatch Jun 21, 2022
627d783
Moved resize time from buffer release to before drawing
versionpatch Jun 22, 2022
1ea160b
Allow disabling of decorations
versionpatch Jun 22, 2022
2c642b9
Added resize direction checks
versionpatch Jun 22, 2022
6c98065
Removed dependency on the decoration close button, a dummy buffer is …
versionpatch Jun 22, 2022
0be4c71
Cursor changes in resize region
versionpatch Jun 22, 2022
5c7906d
Backend stop, focus, middle mouse button
versionpatch Jun 23, 2022
0d18603
Added XDG decoration protocol
versionpatch Jun 23, 2022
7f08134
Added server side decorations
versionpatch Jun 23, 2022
437ee62
Linking
versionpatch Jun 23, 2022
d5c879a
Server side decoration fixes
versionpatch Jun 23, 2022
86f15be
Min Max buttons
versionpatch Jun 23, 2022
d14989a
Removed examples from wayland branch
versionpatch Jun 24, 2022
9f80d01
Refactored surface destruction
versionpatch Jun 27, 2022
fd06b92
Added asserts and the HAS_WAYLAND conditional to xdg-decor-protocol
versionpatch Jun 27, 2022
2fd0963
Modifiers + more fixes
versionpatch Jun 27, 2022
6f39813
Refactored keyboard file
versionpatch Jun 27, 2022
b9ea6f3
Frameless window fix
versionpatch Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/discover/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ let x11_config c =

let wl_config c =
let cflags, libs =
query_or_default c "wayland-client wayland-cursor"
[] [ "-lwayland-client"; "-lwayland-cursor" ]
query_or_default c "wayland-client wayland-cursor xkbcommon"
[] [ "-lwayland-client"; "-lwayland-cursor"; "-lxkbcommon" ]
in
"-DHAS_WAYLAND" :: cflags, "-lrt" :: libs

Expand Down
2 changes: 1 addition & 1 deletion src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
gdi_keyboard gdi_backend gdi_target gdi_window gdi_surface
qtz_keyboard qtz_backend qtz_target qtz_window qtz_surface
x11_keysym x11_keyboard x11_backend x11_target x11_window x11_surface
wl_backend wl_target wl_window wl_surface xdg-shell-protocol
wl_backend wl_memory wl_target wl_window wl_surface wl_decoration wl_keyboard xdg-shell-protocol xdg-decor-protocol
window surface
path arc polygon polygonize poly_render
font_desc gdi_font qtz_font ft_font font
Expand Down
2 changes: 1 addition & 1 deletion src/implem/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ backend_init(
case_GDI(result = gdi_backend_init());
case_QUARTZ(result = qtz_backend_init());
case_X11(result = x11_backend_init());
case_WAYLAND(/*result = wl_backend_init()*/);
case_WAYLAND(result = wl_backend_init());
default_ignore();
}

Expand Down
14 changes: 12 additions & 2 deletions src/implem/surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ surface_destroy(
}

if (s->data) {
free(s->data);
switch_IMPL() {
case_WAYLAND(s->data = NULL;);
default:
free(s->data);
break;
}
}

free(s);
Expand Down Expand Up @@ -191,7 +196,12 @@ surface_resize(

_surface_copy_to_buffer(s, data, width, height);

free(s->data);
switch_IMPL() {
case_WAYLAND(s->data = NULL);
default:
free(s->data);
break;
}

} else {

Expand Down
Loading