summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_Tile.cxx10
1 files 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