Skip to content
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

Allow setting wayland app_id #882

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Changes from all commits
Commits
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
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;
}
}
Loading