From 25447eeb0415cee874721d41fd31e788c95e0418 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 9 Apr 2005 13:51:32 +0000 Subject: Added missing Fl_Window::copy_label() method. Cleaned up screen_xywh() conditional stuff. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4251 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Window.cxx | 13 +++++++++++++ src/screen_xywh.cxx | 9 ++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index f8fb10253..c95b07638 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -30,6 +30,8 @@ #include #include +#include +#include "flstring.h" void Fl_Window::_Fl_Window() { type(FL_WINDOW); @@ -107,6 +109,17 @@ void Fl_Window::draw() { void Fl_Window::label(const char *name) {label(name, iconlabel());} +void Fl_Window::copy_label(const char *a) { + if (flags() & COPIED_LABEL) { + free((void *)label()); + clear_flag(COPIED_LABEL); + } + if (a) a = strdup(a); + label(a, iconlabel()); + set_flag(COPIED_LABEL); +} + + void Fl_Window::iconlabel(const char *iname) { uchar saveflags = flags(); label(label(), iname); diff --git a/src/screen_xywh.cxx b/src/screen_xywh.cxx index 786886d07..8b7c46d38 100644 --- a/src/screen_xywh.cxx +++ b/src/screen_xywh.cxx @@ -35,11 +35,10 @@ static int num_screens = 0; #ifdef WIN32 - -#if !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500) -#define COMPILE_MULTIMON_STUBS -#include -#endif +# if !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500) +# define COMPILE_MULTIMON_STUBS +# include +# endif // !HMONITOR_DECLARED && _WIN32_WINNT < 0x0500 static RECT screens[16]; -- cgit v1.2.3