bk138 / gromit-mpx

Gromit-MPX is an on-screen annotation tool that works with any Unix desktop environment under X11 as well as Wayland.
GNU General Public License v2.0
975 stars 81 forks source link

Unbreak build without X11 libraries #177

Closed jbeich closed 1 year ago

jbeich commented 1 year ago

Some distros may target only Wayland either by default or via user configuration (e.g., Gentoo, FreeBSD, maybe NixPkgs). When GTK is built without X11 support GDK_WINDOWING_X11 isn't defined.

bk138 commented 1 year ago

I don't think the app will work without X11 at all - did you test this at runtime?

jbeich commented 1 year ago

Indeed:

$ gromit-mpx 
(gromit-mpx:56156): Gtk-WARNING **: cannot open display: :0

https://github.com/bk138/gromit-mpx/blob/cff41ddc8724fef93652136a3fcede0295422916/src/main.c#L1042-L1045