From 56af338cfde02e74f236f55dc72631c3b8d8008c Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 18 Oct 2023 17:00:48 +0200 Subject: [PATCH] Fix Fl_Tile::set_cursor() which was broken ... since commit 6ba7b49baf11e526d1ed19aef491db2cd120e55e. --- src/Fl_Tile.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx index b0f41ee89..a24fe56cf 100644 --- a/src/Fl_Tile.cxx +++ b/src/Fl_Tile.cxx @@ -192,11 +192,11 @@ void Fl_Tile::resize(int X,int Y,int W,int H) { This method sets the window cursor for the given index \p n. */ void Fl_Tile::set_cursor(int n) { - if (n < 0 || n > 3) n = 0; // check array index - cursor_ = n; // always store the index - if (cursor_ == n || !window()) - return; - window()->cursor(cursor(n)); + if (n < 0 || n > 3) n = 0; // check array index + if (cursor_ == n) return; // nothing to do + cursor_ = n; // store the cursor index + if (window()) + window()->cursor(cursor(n)); } #define DRAGH 1