summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/UI.cmake1
-rw-r--r--indra/llwindow/llwindowsdl.cpp72
-rw-r--r--indra/llwindow/llwindowsdl.h14
-rw-r--r--indra/newview/lldirpicker.cpp12
-rw-r--r--indra/newview/lldirpicker.h2
-rw-r--r--indra/newview/llfilepicker.cpp6
-rw-r--r--indra/newview/llfilepicker.h2
7 files changed, 54 insertions, 55 deletions
diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake
index 0df62808e7..7ae8d1c883 100644
--- a/indra/cmake/UI.cmake
+++ b/indra/cmake/UI.cmake
@@ -7,7 +7,6 @@ add_library( ll::uilibraries INTERFACE IMPORTED )
if (LINUX)
use_prebuilt_binary(fltk)
- target_compile_definitions(ll::uilibraries INTERFACE LL_FLTK=1 LL_X11=1 )
if( USE_CONAN )
return()
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 218f953c7f..a19aeb80c7 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -66,9 +66,9 @@ static bool ATIbug = false;
// LLWindowSDL
//
-#if LL_X11
+#if LL_LINUX
# include <X11/Xutil.h>
-#endif //LL_X11
+#endif //LL_LINUX
// TOFU HACK -- (*exactly* the same hack as LLWindowMacOSX for a similar
// set of reasons): Stash a pointer to the LLWindowSDL object here and
@@ -93,7 +93,7 @@ void maybe_unlock_display(void)
}
-#if LL_X11
+#if LL_LINUX
// static
Window LLWindowSDL::get_SDL_XWindowID(void)
{
@@ -111,9 +111,9 @@ Display* LLWindowSDL::get_SDL_Display(void)
}
return NULL;
}
-#endif // LL_X11
+#endif // LL_LINUX
-#if LL_X11
+#if LL_LINUX
// Clipboard handing via native X11, base on the implementation in Cool VL by Henri Beauchamp
@@ -382,10 +382,10 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
mIsMinimized = -1;
mFSAASamples = fsaa_samples;
-#if LL_X11
+#if LL_LINUX
mSDL_XWindowID = None;
mSDL_Display = NULL;
-#endif // LL_X11
+#endif // LL_LINUX
// Assume 4:3 aspect ratio until we know better
mOriginalAspectRatio = 1024.0 / 768.0;
@@ -410,10 +410,10 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
// Stash an object pointer for OSMessageBox()
gWindowImplementation = this;
-#if LL_X11
+#if LL_LINUX
mFlashing = FALSE;
initialiseX11Clipboard();
-#endif // LL_X11
+#endif // LL_LINUX
mKeyVirtualKey = 0;
mKeyModifiers = KMOD_NONE;
@@ -435,7 +435,7 @@ static SDL_Surface *Load_BMP_Resource(const char *basename)
return SDL_LoadBMP(path_buffer);
}
-#if LL_X11
+#if LL_LINUX
// This is an XFree86/XOrg-specific hack for detecting the amount of Video RAM
// on this machine. It works by searching /var/log/var/log/Xorg.?.log or
// /var/log/XFree86.?.log for a ': (VideoRAM ?|Memory): (%d+) kB' regex, where
@@ -572,7 +572,7 @@ static int x11_detect_VRAM_kb()
}
return rtn;
}
-#endif // LL_X11
+#endif // LL_LINUX
void LLWindowSDL::setTitle(const std::string title)
{
@@ -800,13 +800,13 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
}
// Detect video memory size.
-# if LL_X11
+# if LL_LINUX
gGLManager.mVRAM = x11_detect_VRAM_kb() / 1024;
if (gGLManager.mVRAM != 0)
{
LL_INFOS() << "X11 log-parser detected " << gGLManager.mVRAM << "MB VRAM." << LL_ENDL;
} else
-# endif // LL_X11
+# endif // LL_LINUX
{
// fallback to letting SDL detect VRAM.
// note: I've not seen SDL's detection ever actually find
@@ -856,7 +856,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
return FALSE;
}
-#if LL_X11
+#if LL_LINUX
/* Grab the window manager specific information */
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
@@ -879,7 +879,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
LL_WARNS() << "We're not running under any known WM. Wild."
<< LL_ENDL;
}
-#endif // LL_X11
+#endif // LL_LINUX
SDL_StartTextInput();
@@ -923,12 +923,12 @@ void LLWindowSDL::destroyContext()
LL_INFOS() << "destroyContext begins" << LL_ENDL;
SDL_StopTextInput();
-#if LL_X11
+#if LL_LINUX
mSDL_Display = NULL;
mSDL_XWindowID = None;
Lock_Display = NULL;
Unlock_Display = NULL;
-#endif // LL_X11
+#endif // LL_LINUX
// Clean up remaining GL state before blowing away window
LL_INFOS() << "shutdownGL begins" << LL_ENDL;
@@ -1180,7 +1180,7 @@ void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immedia
{
LLWindow::setMinSize(min_width, min_height, enforce_immediately);
-#if LL_X11
+#if LL_LINUX
// Set the minimum size limits for X11 window
// so the window manager doesn't allow resizing below those limits.
XSizeHints* hints = XAllocSizeHints();
@@ -1278,9 +1278,9 @@ F32 LLWindowSDL::getPixelAspectRatio()
void LLWindowSDL::beforeDialog()
{
bool running_x11 = false;
-#if LL_X11
+#if LL_LINUX
running_x11 = (mSDL_XWindowID != None);
-#endif //LL_X11
+#endif //LL_LINUX
LL_INFOS() << "LLWindowSDL::beforeDialog()" << LL_ENDL;
@@ -1298,7 +1298,7 @@ void LLWindowSDL::beforeDialog()
}
}
-#if LL_X11
+#if LL_LINUX
if (mSDL_Display)
{
// Everything that we/SDL asked for should happen before we
@@ -1307,7 +1307,7 @@ void LLWindowSDL::beforeDialog()
XSync(mSDL_Display, False);
maybe_unlock_display();
}
-#endif // LL_X11
+#endif // LL_LINUX
maybe_lock_display();
}
@@ -1315,9 +1315,9 @@ void LLWindowSDL::beforeDialog()
void LLWindowSDL::afterDialog()
{
bool running_x11 = false;
-#if LL_X11
+#if LL_LINUX
running_x11 = (mSDL_XWindowID != None);
-#endif //LL_X11
+#endif //LL_LINUX
LL_INFOS() << "LLWindowSDL::afterDialog()" << LL_ENDL;
@@ -1335,7 +1335,7 @@ void LLWindowSDL::afterDialog()
}
-#if LL_X11
+#if LL_LINUX
// set/reset the XWMHints flag for 'urgency' that usually makes the icon flash
void LLWindowSDL::x11_set_urgent(BOOL urgent)
{
@@ -1361,13 +1361,13 @@ void LLWindowSDL::x11_set_urgent(BOOL urgent)
maybe_unlock_display();
}
}
-#endif // LL_X11
+#endif // LL_LINUX
void LLWindowSDL::flashIcon(F32 seconds)
{
if (getMinimized())
{
-#if !LL_X11
+#if !LL_LINUX
LL_INFOS() << "Stub LLWindowSDL::flashIcon(" << seconds << ")" << LL_ENDL;
#else
LL_INFOS() << "X11 LLWindowSDL::flashIcon(" << seconds << ")" << LL_ENDL;
@@ -1380,7 +1380,7 @@ void LLWindowSDL::flashIcon(F32 seconds)
x11_set_urgent(TRUE);
mFlashing = TRUE;
-#endif // LL_X11
+#endif // LL_LINUX
}
}
@@ -1550,7 +1550,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
bool newGrab = wantGrab;
-#if LL_X11
+#if LL_LINUX
if (!mFullscreen) /* only bother if we're windowed anyway */
{
if (mSDL_Display)
@@ -1590,7 +1590,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture)
}
}
}
-#endif // LL_X11
+#endif // LL_LINUX
// return boolean success for whether we ended up in the desired state
return capture == newGrab;
}
@@ -1994,7 +1994,7 @@ void LLWindowSDL::gatherInput()
updateCursor();
-#if LL_X11
+#if LL_LINUX
// This is a good time to stop flashing the icon if our mFlashTimer has
// expired.
if (mFlashing && mFlashTimer.hasExpired())
@@ -2002,7 +2002,7 @@ void LLWindowSDL::gatherInput()
x11_set_urgent(FALSE);
mFlashing = FALSE;
}
-#endif // LL_X11
+#endif // LL_LINUX
}
static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty)
@@ -2428,7 +2428,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
LL_INFOS() << "spawn_web_browser: " << escaped_url << LL_ENDL;
#if LL_LINUX
-# if LL_X11
+# if LL_LINUX
if (mSDL_Display)
{
maybe_lock_display();
@@ -2436,7 +2436,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
XSync(mSDL_Display, False);
maybe_unlock_display();
}
-# endif // LL_X11
+# endif // LL_LINUX
std::string cmd, arg;
cmd = gDirUtilp->getAppRODataDir();
@@ -2466,7 +2466,7 @@ void LLWindowSDL::bringToFront()
// This is currently used when we are 'launched' to a specific
// map position externally.
LL_INFOS() << "bringToFront" << LL_ENDL;
-#if LL_X11
+#if LL_LINUX
if (mSDL_Display && !mFullscreen)
{
maybe_lock_display();
@@ -2474,7 +2474,7 @@ void LLWindowSDL::bringToFront()
XSync(mSDL_Display, False);
maybe_unlock_display();
}
-#endif // LL_X11
+#endif // LL_LINUX
}
//static
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index d24739cbda..44b031b703 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -35,7 +35,7 @@
#include "SDL2/SDL.h"
#include "SDL2/SDL_endian.h"
-#if LL_X11
+#if LL_LINUX
// get X11-specific headers for use in low-level stuff like copy-and-paste support
#include "SDL2/SDL_syswm.h"
#endif
@@ -184,7 +184,7 @@ public:
// Not great that these are public, but they have to be accessible
// by non-class code and it's better than making them global.
-#if LL_X11
+#if LL_LINUX
Window mSDL_XWindowID;
Display *mSDL_Display;
#endif
@@ -193,13 +193,13 @@ public:
void (*Unlock_Display)(void);
-#if LL_X11
+#if LL_LINUX
static Window get_SDL_XWindowID(void);
static Display *get_SDL_Display(void);
-#endif // LL_X11
+#endif // LL_LINUX
void *createSharedContext() override;
@@ -282,20 +282,20 @@ protected:
friend class LLWindowManager;
private:
-#if LL_X11
+#if LL_LINUX
void x11_set_urgent(BOOL urgent);
BOOL mFlashing;
LLTimer mFlashTimer;
-#endif //LL_X11
+#endif //LL_LINUX
U32 mKeyVirtualKey;
U32 mKeyModifiers;
std::string mInputType;
public:
-#if LL_X11
+#if LL_LINUX
static Display *getSDLDisplay();
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index 75875551f4..957bd6a4d3 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -41,7 +41,7 @@
# include "llfilepicker.h"
#endif
-#ifdef LL_FLTK
+#ifdef LL_LINUX
#include "FL/Fl.H"
#include "FL/Fl_Native_File_Chooser.H"
#endif
@@ -197,7 +197,7 @@ LLDirPicker::LLDirPicker() :
mFileName(NULL),
mLocked(false)
{
-#ifndef LL_FLTK
+#ifndef LL_LINUX
mFilePicker = new LLFilePicker();
#endif
reset();
@@ -205,7 +205,7 @@ LLDirPicker::LLDirPicker() :
LLDirPicker::~LLDirPicker()
{
-#ifndef LL_FLTK
+#ifndef LL_LINUX
delete mFilePicker;
#endif
}
@@ -213,7 +213,7 @@ LLDirPicker::~LLDirPicker()
void LLDirPicker::reset()
{
-#ifndef LL_FLTK
+#ifndef LL_LINUX
if (mFilePicker)
mFilePicker->reset();
#else
@@ -231,7 +231,7 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
return FALSE;
}
-#ifdef LL_FLTK
+#ifdef LL_LINUX
gViewerWindow->getWindow()->beforeDialog();
Fl_Native_File_Chooser flDlg;
flDlg.title(LLTrans::getString("choose_the_directory").c_str());
@@ -254,7 +254,7 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
std::string LLDirPicker::getDirName()
{
-#ifndef LL_FLTK
+#ifndef LL_LINUX
if (mFilePicker)
{
return mFilePicker->getFirstFile();
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index bcc7792c1a..5a3316d500 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -80,7 +80,7 @@ private:
#if LL_LINUX || LL_DARWIN
// On Linux we just implement LLDirPicker on top of LLFilePicker
-#ifndef LL_FLTK
+#ifndef LL_LINUX
LLFilePicker *mFilePicker;
#endif
#endif
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index d6f3727643..5be987f92a 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -40,7 +40,7 @@
#include "llwindowsdl.h" // for some X/GTK utils to help with filepickers
#endif // LL_SDL
-#ifdef LL_FLTK
+#ifdef LL_LINUX
#include "FL/Fl.H"
#include "FL/Fl_Native_File_Chooser.H"
#endif
@@ -1101,7 +1101,7 @@ BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter,
#elif LL_LINUX
-#if LL_FLTK
+#if LL_LINUX
BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter,
const std::string& filename,
@@ -1410,7 +1410,7 @@ BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
return FALSE;
}
-#endif // LL_FLTK
+#endif // LL_LINUX
#else // not implemented
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 1ca4137ac6..ddf3d7ca16 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -172,7 +172,7 @@ private:
void *userdata);
#endif
-#if LL_FLTK
+#if LL_LINUX
enum EType
{
eSaveFile, eOpenFile, eOpenMultiple