diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-11 19:11:28 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-11 19:11:28 +0100 |
| commit | 9a5688f000c0948b87901f51e18a230b8234e51a (patch) | |
| tree | 4c6fe1e7bf80dc02300b5790639a5f57ae6dfd52 /src/Fl_Cairo.cxx | |
| parent | 7c3b1f00f524172e348151aedb0fb4c4a91185b3 (diff) | |
Fix "Drawing to the wrong window with cairo and X11" (#1358)
Diffstat (limited to 'src/Fl_Cairo.cxx')
| -rw-r--r-- | src/Fl_Cairo.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Cairo.cxx b/src/Fl_Cairo.cxx index a5b471392..5f9a18ee4 100644 --- a/src/Fl_Cairo.cxx +++ b/src/Fl_Cairo.cxx @@ -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 |
