Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions cmd/webview/icon_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ package main
static void wfSetAppIcon(void *window, const void *bytes, int len) {
GtkWindow *gtk_window = GTK_WINDOW(window);

// X11 shells associate the window with chartr.desktop through WM_CLASS.
// The explicit value also avoids inheriting an AppImage filename as the
// class on runtimes which derive it from argv[0].
gtk_window_set_wmclass(gtk_window, "chartr", "chartr");

// A GdkWindow exists after realization. On Wayland its application ID is
// the only supported way for the compositor to associate this surface with
// chartr.desktop and therefore with the icon bundled in the AppImage.
Expand Down
4 changes: 3 additions & 1 deletion cmd/webview/menu_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
package main

/*
#cgo pkg-config: glib-2.0
#cgo pkg-config: gtk+-3.0

#include <glib.h>
#include <gdk/gdk.h>
#include <stdlib.h>

static void wfSetAppName(const char *name) {
Expand All @@ -14,6 +15,7 @@ static void wfSetAppName(const char *name) {
// they match chartr.desktop regardless of the AppImage's filename.
g_set_prgname(name);
g_set_application_name(name);
gdk_set_program_class(name);
}
*/
import "C"
Expand Down
1 change: 1 addition & 0 deletions scripts/smoke-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ docker run --rm -v "$(realpath "$APPIMAGE")":/chartr.AppImage:ro "$IMAGE" bash -
WINDOW_ID=$(xdotool search --onlyvisible --name "chartr" 2>/dev/null | head -n 1)
[ -n "$WINDOW_ID" ] || fail "could not find the chartr window"
PROPS=$(xprop -id "$WINDOW_ID" WM_CLASS _NET_WM_ICON)
echo "$PROPS"
echo "$PROPS" | grep -q "WM_CLASS(STRING) = \"chartr\", \"chartr\"" || \
fail "the window WM_CLASS does not match chartr.desktop"
echo "$PROPS" | grep -q "_NET_WM_ICON(CARDINAL) =" || \
Expand Down
Loading