Fix build on cygwin when using --without-x

* src/frontends/qt4/GuiView.C
	(setGeometry): replace test for Q_OS_WIN32 with Q_WS_WIN

	* src/support/fontutils.C:
	If X_DISPLAY_MISSING is defined, compile the code for Win32
	on cygwin, too.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15201 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2006-10-02 18:21:48 +00:00
parent 481e6a3ac7
commit 5070d2f660
2 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ void GuiView::setGeometry(unsigned int width,
// only true when the -geometry option was NOT used // only true when the -geometry option was NOT used
if (width != 0 && height != 0) { if (width != 0 && height != 0) {
if (posx != -1 && posy != -1) { if (posx != -1 && posy != -1) {
#ifdef Q_OS_WIN32 #ifdef Q_WS_WIN
// FIXME: use only setGeoemtry when Trolltech has // FIXME: use only setGeoemtry when Trolltech has
// fixed the qt4/X11 bug // fixed the qt4/X11 bug
QMainWindow::setGeometry(posx, posy,width, height); QMainWindow::setGeometry(posx, posy,width, height);

View File

@ -23,7 +23,7 @@
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#endif #endif
#ifdef _WIN32 #if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING))
#include "windows.h" #include "windows.h"
#include "support/os.h" #include "support/os.h"
#include "support/package.h" #include "support/package.h"
@ -74,7 +74,7 @@ void addFontResources()
lyxerr << "FMActivateFonts err = " << err << endl; lyxerr << "FMActivateFonts err = " << err << endl;
#endif #endif
#ifdef _WIN32 #if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING))
// Windows only: Add BaKoMa TrueType font resources // Windows only: Add BaKoMa TrueType font resources
string const fonts_dir = addPath(package().system_support(), "fonts"); string const fonts_dir = addPath(package().system_support(), "fonts");
@ -89,7 +89,7 @@ void addFontResources()
void restoreFontResources() void restoreFontResources()
{ {
#ifdef _WIN32 #if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING))
// Windows only: Remove BaKoMa TrueType font resources // Windows only: Remove BaKoMa TrueType font resources
string const fonts_dir = addPath(package().system_support(), "fonts"); string const fonts_dir = addPath(package().system_support(), "fonts");