mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
app: add app.ID exposed to the platform.
Allow app ID to be set by linger flag -X gioui.org/app.ID=%s so that wayland
can group windows, search for ${gioui.org/app.ID}.desktop file and display
application name. e.g. /usr/share/applications/${gioui.org/app.ID}.desktop
~/.local/share/applications/${appID}.desktop.
ID is set by the gogio tool or manually with the -X linker flag.
Signed-off-by: Marko Kungla <marko.kungla@gmail.com>
This commit is contained in:
+1
-3
@@ -30,8 +30,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"image"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -793,7 +791,7 @@ func newX11Window(gioWin *callbacks, options []Option) error {
|
||||
hints.flags = C.InputHint
|
||||
C.XSetWMHints(dpy, win, &hints)
|
||||
|
||||
name := C.CString(filepath.Base(os.Args[0]))
|
||||
name := C.CString(ID)
|
||||
defer C.free(unsafe.Pointer(name))
|
||||
wmhints := C.XClassHint{name, name}
|
||||
C.XSetClassHint(dpy, win, &wmhints)
|
||||
|
||||
Reference in New Issue
Block a user