Skip to content

Commit

Permalink
Merge pull request #882 from tcdude/WaylandSetAppId
Browse files Browse the repository at this point in the history
Allow setting wayland app_id
  • Loading branch information
RobDangerous authored Aug 17, 2024
2 parents 63c5e7a + 0377fbf commit c50adaf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ static const struct wp_fractional_scale_v1_listener wp_fractional_scale_v1_liste
void kinc_wayland_window_set_title(int window_index, const char *title);
void kinc_wayland_window_change_mode(int window_index, kinc_window_mode_t mode);

#ifndef KINC_WAYLAND_APP_ID
#define KINC_WAYLAND_APP_ID "_KincApplication"
#endif

int kinc_wayland_window_create(kinc_window_options_t *win, kinc_framebuffer_options_t *frame) {
int window_index = -1;
for (int i = 0; i < MAXIMUM_WINDOWS; i++) {
Expand Down Expand Up @@ -407,6 +411,8 @@ int kinc_wayland_window_create(kinc_window_options_t *win, kinc_framebuffer_opti
window->decorations.server_side = false;
}

xdg_toplevel_set_app_id(window->toplevel, KINC_WAYLAND_APP_ID);

wl_surface_commit(window->surface);
wl_ctx.num_windows++;

Expand Down Expand Up @@ -527,4 +533,4 @@ int kinc_wayland_window_display(int window_index) {

int kinc_wayland_count_windows() {
return wl_ctx.num_windows;
}
}

0 comments on commit c50adaf

Please sign in to comment.