fl_gc not available on wayland

12 views
Skip to first unread message

Mo_Al_

unread,
Mar 17, 2023, 5:25:46 AM3/17/23
to fltk.general
Hello

It seems the fl_gc global variable is not available when building for wayland. I'm wondering if this was just an oversight, or if there's another way to check for graphics context?

Thank you

Matthias Melcher

unread,
Mar 17, 2023, 5:37:55 AM3/17/23
to fltk.general
Wayland uses a different API: https://fltk.gitlab.io/fltk/osissues.html#osissues_wayland

See:

/** Returns the Wayland display in use */

extern FL_EXPORT struct wl_display *fl_wl_display();

/** Returns the wl_surface associated to a shown window */

extern FL_EXPORT struct wl_surface *fl_wl_surface(struct wld_window *xid);

/** Returns a platform-specific reference associated to a shown window */

extern FL_EXPORT struct wld_window *fl_wl_xid(const Fl_Window *win);


GOUY MANOLO

unread,
Mar 17, 2023, 6:48:47 AM3/17/23
to fltkg...@googlegroups.com
See

extern FL_EXPORT cairo_t *fl_wl_cairo();
Defined in Fl/platform.H


Le 17 mars 2023 à 10:25, Mo_Al_ <may64...@gmail.com> a écrit :

Hello


It seems the fl_gc global variable is not available when building for wayland. I'm wondering if this was just an oversight, or if there's another way to check for graphics context?

Thank you

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/c40f89db-a8e5-41d8-9717-a2dc5af77b11n%40googlegroups.com.

Mo_Al_

unread,
Mar 17, 2023, 7:52:38 AM3/17/23
to fltk.general
Thank you both for your answers. 

Matthias Melcher

unread,
Mar 17, 2023, 11:19:30 AM3/17/23
to fltk.general
Thanks, Manolo. Your solution is better.
Reply all
Reply to author
Forward
0 new messages