Fix "Drawing to the wrong window with cairo and X11" (#1358)
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

This commit is contained in:
ManoloFLTK
2026-01-11 19:11:28 +01:00
parent 7c3b1f00f5
commit 9a5688f000
+2 -2
View File
@@ -168,8 +168,6 @@ cairo_t *Fl::cairo_make_current(Fl_Window *wi) {
if (fl_gc == Fl::Private::cairo_state_.gc() && fl_xid(wi) == (Window)Fl::Private::cairo_state_.window())
return Fl::cairo_cc();
Fl::Private::cairo_state_.window((void *)fl_xid(wi));
// Scale the Cairo context appropriately. This is platform dependent
#if !defined(USE_MAC_OS)
@@ -183,6 +181,8 @@ cairo_t *Fl::cairo_make_current(Fl_Window *wi) {
cairo_ctxt = Fl::Private::cairo_make_current(fl_gc, wi->w(), wi->h());
#endif
Fl::Private::cairo_state_.window((void *)fl_xid(wi));
#if !defined(USE_MAC_OS)
cairo_scale(cairo_ctxt, scale, scale);
#endif