From 5cd80a8dce1c7f35546567b0e2af6bed3e1116d8 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 20 Dec 2001 22:44:04 +0000 Subject: Patch from stephan to avoid setting cursor to the same value multiple times on GTK+ as it is retained by the window. Minor cleanups. --- include/Platform.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/Platform.h b/include/Platform.h index 80f5af2e3..b3cfcfe66 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -310,8 +310,8 @@ class Window { protected: WindowID id; public: - Window() : id(0) {} - Window(const Window &source) : id(source.id) {} + Window() : id(0), cursorLast(cursorInvalid) {} + Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} virtual ~Window(); Window &operator=(WindowID id_) { id = id_; @@ -329,9 +329,11 @@ public: void InvalidateAll(); void InvalidateRectangle(PRectangle rc); virtual void SetFont(Font &font); - enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow }; + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow }; void SetCursor(Cursor curs); void SetTitle(const char *s); +private: + Cursor cursorLast; }; /** -- cgit v1.2.3