From 5070d2f660e9a9027eb36cd5437d2b33242d6067 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 2 Oct 2006 18:21:48 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiView.C | 2 +- src/support/fontutils.C | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiView.C b/src/frontends/qt4/GuiView.C index c3ac402172..cb6ad4b34c 100644 --- a/src/frontends/qt4/GuiView.C +++ b/src/frontends/qt4/GuiView.C @@ -117,7 +117,7 @@ void GuiView::setGeometry(unsigned int width, // only true when the -geometry option was NOT used if (width != 0 && height != 0) { if (posx != -1 && posy != -1) { -#ifdef Q_OS_WIN32 +#ifdef Q_WS_WIN // FIXME: use only setGeoemtry when Trolltech has // fixed the qt4/X11 bug QMainWindow::setGeometry(posx, posy,width, height); diff --git a/src/support/fontutils.C b/src/support/fontutils.C index f0e8ae90fa..1d3e2d24f0 100644 --- a/src/support/fontutils.C +++ b/src/support/fontutils.C @@ -23,7 +23,7 @@ #include #endif -#ifdef _WIN32 +#if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING)) #include "windows.h" #include "support/os.h" #include "support/package.h" @@ -74,7 +74,7 @@ void addFontResources() lyxerr << "FMActivateFonts err = " << err << endl; #endif -#ifdef _WIN32 +#if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING)) // Windows only: Add BaKoMa TrueType font resources string const fonts_dir = addPath(package().system_support(), "fonts"); @@ -89,7 +89,7 @@ void addFontResources() void restoreFontResources() { -#ifdef _WIN32 +#if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING)) // Windows only: Remove BaKoMa TrueType font resources string const fonts_dir = addPath(package().system_support(), "fonts");