diff --git a/api/gutil.C b/api/gutil.C index a69b9d7cd4..b126a9a82b 100755 --- a/api/gutil.C +++ b/api/gutil.C @@ -19,9 +19,9 @@ #ifdef _WIN32 #include "boinc_win.h" -extern "C"{ +//extern "C"{ #include "jpeglib.h" -} +//} #include "bmplib.h" #include "tgalib.h" #endif diff --git a/api/windows_opengl.C b/api/windows_opengl.C index bb7cd76455..c771991805 100755 --- a/api/windows_opengl.C +++ b/api/windows_opengl.C @@ -17,7 +17,6 @@ #include "graphics_api.h" #include "app_ipc.h" #include "util.h" -#include "win_util.h" #define BOINC_WINDOW_CLASS_NAME "BOINC_app" @@ -172,7 +171,17 @@ static void set_mode(int mode) { int new_mode = mode; if (mode == current_graphics_mode) return; - if (current_graphics_mode != MODE_FULLSCREEN) GetWindowRect(hWnd, &rect); + if (current_graphics_mode != MODE_FULLSCREEN) { + if (IsIconic(hWnd) || IsZoomed(hWnd)){ + // If graphics window is minimized or maximized + // then set default values of window size + rect.left = 50; + rect.top = 50; + rect.right = 50+640; + rect.bottom = 50+480; + } + else GetWindowRect(hWnd, &rect); // else get current values + } KillWindow(); diff --git a/checkin_notes b/checkin_notes index 7c233044c3..4ac2fb42ae 100755 --- a/checkin_notes +++ b/checkin_notes @@ -21798,3 +21798,21 @@ David 25 Dec 2004 client_types.C,h tools/ backend_lib.C + +David 25 Dec 2004 + - bug fix (from Nikolay Saharov): if user minimized app graphics window, + then closed it, then did "show graphics" again, + the result would be a nonexistent window, + impossible to manipulate. + Fix this by using original window size if window + is minimized or maximized + - compile fixes for SETI@home on Windows + removed extern "C" on jpeglib.h include (why did I need this + in the first place??) + api/ + gutil.c + gutil.C + windows_opengl.C + win_build/ + config.h (new) + win-config.h (new) diff --git a/win_build/config.h b/win_build/config.h new file mode 100644 index 0000000000..a6dd6bbb48 --- /dev/null +++ b/win_build/config.h @@ -0,0 +1 @@ +#include "win-config.h" \ No newline at end of file diff --git a/win_build/win-config.h b/win_build/win-config.h new file mode 100644 index 0000000000..5090dfe743 --- /dev/null +++ b/win_build/win-config.h @@ -0,0 +1,337 @@ +// Copyright 2003 Regents of the University of California + +// SETI_BOINC is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. + +// SETI_BOINC is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +// more details. + +// You should have received a copy of the GNU General Public License along +// with SETI_BOINC; see the file COPYING. If not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* config.h. Generated by configure. */ + +#ifndef _SAH_WIN_CONFIG_H_ +#define _SAH_WIN_CONFIG_H_ + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the `atoll' function. */ +/* #define HAVE_ATOLL 1 */ + +/* Define to 1 if the system has the type `bool'. */ +#define HAVE_BOOL 1 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_DIRENT_H 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `floor' function. */ +#define HAVE_FLOOR 1 + +/* Define to 1 if you have the `fork' function. */ +//#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GLUT_GLUT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GLUT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GLU_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GL_GLUT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_GL_GLU_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GL_GL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define to 1 if you have the `aio' library (-laio). */ +//#define HAVE_LIBAIO 1 + +/* Define to 1 if you have the `dl' library (-ldl). */ +//#define HAVE_LIBDL 1 + +/* Define to 1 if you have the `elf' library (-lelf). */ +//#define HAVE_LIBELF 1 + +/* Define to 1 if you have the `fftw' library (-lfftw). */ +/* #undef HAVE_LIBFFTW */ + +/* Define to 1 if you have the `GL' library (-lGL). */ +#define HAVE_LIBGL 1 + +/* Define to 1 if you have the `ICE' library (-lICE). */ +//#define HAVE_LIBICE 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +//#define HAVE_LIBNSL 1 + +/* Define to 1 if you have the `rsaeuro' library (-lrsaeuro). */ +/* #undef HAVE_LIBRSAEURO */ + +/* Define to 1 if you have the `s4' library (-ls4). */ +/* #undef HAVE_LIBS4 */ + +/* Define to 1 if you have the `SM' library (-lSM). */ +//#define HAVE_LIBSM 1 + +/* Define to 1 if you have the `socket' library (-lsocket). */ +//#define HAVE_LIBSOCKET 1 + +/* Define to 1 if you have the `stdc++' library (-lstdc++). */ +//#define HAVE_LIBSTDC__ 1 + +/* Define to 1 if you have the `X11' library (-lX11). */ +//#define HAVE_LIBX11 1 + +/* Define to 1 if you have the `Xaw' library (-lXaw). */ +//#define HAVE_LIBXAW 1 + +/* Define to 1 if you have the `Xext' library (-lXext). */ +//#define HAVE_LIBXEXT 1 + +/* Define to 1 if you have the `Xmu' library (-lXmu). */ +//#define HAVE_LIBXMU 1 + +/* Define to 1 if you have the `Xt' library (-lXt). */ +/* #define HAVE_LIBXT 1 */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #define HAVE_LIBZ 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if long double works and has more range or precision than + double. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define to 1 if the system has the type `long long'. */ +/* #undef HAVE_LONG_LONG */ + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define HAVE_MALLOC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the `munmap' function. */ +/* #define HAVE_MUNMAP 1 */ + +/* Define if your C++ compiler supports namespaces */ +#define HAVE_NAMESPACES 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENGL_GLUT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENGL_GLU_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENGL_GL_H */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#define HAVE_REALLOC 1 + +/* Define to 1 if you have the `sqrt' function. */ +#define HAVE_SQRT 1 + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +/* #undef HAVE_STAT_EMPTY_STRING_BUG */ + +#if ( _MSC_VER > 1300 ) + /* Define to 1 if the max template is in namespace std. */ + #define HAVE_STD_MAX 1 + + /* Define to 1 if the min template is in namespace std. */ + #define HAVE_STD_MIN 1 +#endif + +/* Define to 1 if the transform template is in namespace std. */ +#define HAVE_STD_TRANSFORM 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +/* #undef HAVE_STDBOOL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDINT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_STRINGS_H 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if `st_blocks' is member of `struct stat'. */ +/* #define HAVE_STRUCT_STAT_ST_BLOCKS 1 */ + +/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ +/* #define HAVE_ST_BLOCKS 1 */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_IOCTL_H 1 */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_STATVFS_H 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TIME_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +/* #define HAVE_SYS_WAIT_H 1 */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_UNISTD_H 1 */ + +/* Define to 1 if you have the `vfork' function. */ +/* #define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if `fork' works. */ +/* #define HAVE_WORKING_FORK 1 */ + +/* Define to 1 if `vfork' works. */ +/* #define HAVE_WORKING_VFORK 1 */ + +/* Define to 1 if the system has the type `_Bool'. */ +/* #undef HAVE__BOOL */ + +/* Define to 1 if the system has the type `_int64'. */ +/* #define HAVE__INT64 1 */ + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in . + */ +#define MAJOR_IN_MKDEV 1 + +/* Define to 1 if `major', `minor', and `makedev' are declared in + . */ +/* #undef MAJOR_IN_SYSMACROS */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "ports@setiathome.ssl.berkeley.edu" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "setiathome" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "setiathome 4.00" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "setiathome" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "4.00" + +/* The size of a `long double', as computed by sizeof. */ +#define SIZEOF_LONG_DOUBLE sizeof (long double) + +/* The size of a `long int', as computed by sizeof. */ +#define SIZEOF_LONG_INT 4 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Define to 1 if informix is installed */ +/* #undef USE_INFORMIX */ + +/* Define if MYSQL is installed */ +/* #undef USE_MYSQL */ + +/* SETI@home major version number */ +#define VERSION_MAJOR 4 + +/* SETI@home minor version number */ +#define VERSION_MINOR 13 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +/* #undef inline */ + +/* Define to rpl_malloc if the replacement function should be used. */ +/* #undef malloc */ + +/* Define to `long' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to rpl_realloc if the replacement function should be used. */ +/* #undef realloc */ + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ + +#if defined(USE_INFORMIX) && defined(USE_MYSQL) && defined(HAVE_NAMESPACES) +#define USE_NAMESPACES +#endif + +#endif