mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-05 13:29:47 -05:00
Add shim implementations of wl_{compositor,shell}
To example compositor
This commit is contained in:
parent
28736c5787
commit
486ec5953c
5 changed files with 133 additions and 0 deletions
|
|
@ -12,9 +12,12 @@
|
|||
#include <wlr/types/wlr_output.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include "shared.h"
|
||||
#include "compositor.h"
|
||||
|
||||
struct sample_state {
|
||||
struct wlr_renderer *renderer;
|
||||
struct wl_compositor_state compositor;
|
||||
struct wl_shell_state shell;
|
||||
};
|
||||
|
||||
void handle_output_frame(struct output_state *output, struct timespec *ts) {
|
||||
|
|
@ -37,6 +40,8 @@ int main() {
|
|||
|
||||
state.renderer = wlr_gles2_renderer_init();
|
||||
wl_display_init_shm(compositor.display);
|
||||
wl_compositor_init(compositor.display, &state.compositor);
|
||||
wl_shell_init(compositor.display, &state.shell);
|
||||
|
||||
compositor_run(&compositor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue