Repository navigation
Conversation
Desktop environments (KDE Plasma, GNOME, ...) match windows to .desktop entries using the Wayland app_id or the X11 WM_CLASS. Without a class the taskbar cannot associate the window with a .desktop entry, so icon-only taskbars show no icon. Add Application::setAppId() (call before createWindow()) and apply it through the GLFW_WAYLAND_APP_ID / GLFW_X11_CLASS_NAME / GLFW_X11_INSTANCE_NAME hints when creating the GLFW window.
This was referenced Aug 2, 2026
1 of 5 tasks
There was a problem hiding this comment.
Pull request overview
Adds a Borealis-level API to set an application identifier and forwards it into GLFW window hints so Linux desktop environments can correctly associate a window with its .desktop entry (Wayland app_id / X11 WM_CLASS), enabling proper taskbar icon matching.
Changes:
- Introduces
brls::Application::setAppId()/getAppId()to store an application identifier. - Applies the stored app ID to GLFW window hints during GLFW window creation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| library/lib/platforms/glfw/glfw_video.cpp | Sets platform windowing hints based on Application::getAppId() before window creation. |
| library/include/borealis/core/application.hpp | Adds setAppId/getAppId API and backing storage for the app identifier. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+241
to
+250
| #if defined(__linux__) || defined(_WIN32) || defined(__APPLE__) | ||
| // Set the application ID so desktop environments can match this window to its | ||
| // .desktop entry (Wayland app_id / X11 WM_CLASS) — required for taskbar icons. | ||
| const std::string& appId = Application::getAppId(); | ||
| if (!appId.empty()) | ||
| { | ||
| glfwWindowHint(GLFW_WAYLAND_APP_ID, appId.c_str()); | ||
| glfwWindowHint(GLFW_X11_CLASS_NAME, appId.c_str()); | ||
| glfwWindowHint(GLFW_X11_INSTANCE_NAME, appId.c_str()); | ||
| } |
Comment on lines
64
to
+66
| static inline uint32_t ORIGINAL_WINDOW_WIDTH = 1280; | ||
| static inline uint32_t ORIGINAL_WINDOW_HEIGHT = 720; | ||
| inline static std::string appId = ""; |
The Wayland/X11 app id hints are string hints and must be passed via glfwWindowHintString() (glfwWindowHint() takes an int). Also close the #if block and guard each hint macro for GLFW < 3.3 compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Wayland, wiliwili's window reports an empty app_id (verified via KWin:
resourceClass=""), so desktop environments like KDE Plasma cannot match the window to its.desktopentry. Result: the window shows no icon in the icon-only taskbar.Root cause: the bundled GLFW only sends
xdg_toplevel_set_app_idwhen theGLFW_WAYLAND_APP_IDhint is set (see xfangfang/glfwwl_window.c), and borealis never sets it.Fix
Add a small
Application::setAppId()API (call it beforecreateWindow()) and apply it via:GLFW_WAYLAND_APP_ID(Wayland app_id)GLFW_X11_CLASS_NAME/GLFW_X11_INSTANCE_NAME(X11 WM_CLASS)Only affects the GLFW desktop backend; no-op when the app id is empty. Other platforms are untouched.
Companion PR in wiliwili will call
brls::Application::setAppId("cn.xfangfang.wiliwili"). Follow-up issue: xfangfang/wiliwili (taskbar icon).