Initial moap commit. /VERY/ WIP. Primarily committed to clean up unstaged changes. Do not run this, even if it may compile, as it will NOT work (for a myriad of reasons)!

This commit is contained in:
Shyotl
2013-05-31 05:33:41 -05:00
parent 641ada030e
commit ef3e918558
148 changed files with 15636 additions and 4633 deletions

View File

@@ -124,10 +124,9 @@ class LLDragDropWin32Target:
ScreenToClient( mAppWindowHandle, &pt2 );
LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
window_imp->convertCoords(cursor_coord_window, &gl_coord);
MASK mask = gKeyboard->currentMask(TRUE);
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask,
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( cursor_coord_window.convert(), mask,
LLWindowCallbacks::DNDA_START_TRACKING, mDropUrl );
switch (result)
@@ -180,10 +179,9 @@ class LLDragDropWin32Target:
ScreenToClient( mAppWindowHandle, &pt2 );
LLCoordWindow cursor_coord_window( pt2.x, pt2.y );
window_imp->convertCoords(cursor_coord_window, &gl_coord);
MASK mask = gKeyboard->currentMask(TRUE);
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( gl_coord, mask,
LLWindowCallbacks::DragNDropResult result = window_imp->completeDragNDropRequest( cursor_coord_window.convert(), mask,
LLWindowCallbacks::DNDA_TRACK, mDropUrl );
switch (result)
@@ -237,15 +235,13 @@ class LLDragDropWin32Target:
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong( mAppWindowHandle, GWL_USERDATA );
if ( NULL != window_imp )
{
LLCoordGL gl_coord( 0, 0 );
POINT pt_client;
pt_client.x = pt.x;
pt_client.y = pt.y;
ScreenToClient( mAppWindowHandle, &pt_client );
LLCoordWindow cursor_coord_window( pt_client.x, pt_client.y );
window_imp->convertCoords(cursor_coord_window, &gl_coord);
LLCoordGL gl_coord(cursor_coord_window.convert());
llinfos << "### (Drop) URL is: " << mDropUrl << llendl;
llinfos << "### raw coords are: " << pt.x << " x " << pt.y << llendl;
llinfos << "### client coords are: " << pt_client.x << " x " << pt_client.y << llendl;

View File

@@ -50,14 +50,15 @@ LLSplashScreen *gSplashScreenp = NULL;
BOOL gDebugClicks = FALSE;
BOOL gDebugWindowProc = FALSE;
const S32 gURLProtocolWhitelistCount = 3;
const std::string gURLProtocolWhitelist[] = { "file:", "http:", "https:" };
const S32 gURLProtocolWhitelistCount = 4;
const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:"/*, "file:"*/ };
// CP: added a handler list - this is what's used to open the protocol and is based on registry entry
// only meaningful difference currently is that file: protocols are opened using http:
// since no protocol handler exists in registry for file:
// Important - these lists should match - protocol to handler
const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" };
// Maestro: This list isn't referenced anywhere that I could find
//const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" };
S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
@@ -112,6 +113,8 @@ LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
mCursorHidden(FALSE),
mBusyCount(0),
mIsMouseClipping(FALSE),
mMinWindowWidth(0),
mMinWindowHeight(0),
mSwapMethod(SWAP_METHOD_UNDEFINED),
mHideCursorPermanent(FALSE),
mFlags(flags),
@@ -180,6 +183,51 @@ void *LLWindow::getMediaWindow()
return getPlatformWindow();
}
BOOL LLWindow::setSize(LLCoordScreen size)
{
if (!getMaximized())
{
size.mX = llmax(size.mX, mMinWindowWidth);
size.mY = llmax(size.mY, mMinWindowHeight);
}
return setSizeImpl(size);
}
BOOL LLWindow::setSize(LLCoordWindow size)
{
//HACK: we are inconsistently using minimum window dimensions
// in this case, we are constraining the inner "client" rect and other times
// we constrain the outer "window" rect
// There doesn't seem to be a good way to do this consistently without a bunch of platform
// specific code
if (!getMaximized())
{
size.mX = llmax(size.mX, mMinWindowWidth);
size.mY = llmax(size.mY, mMinWindowHeight);
}
return setSizeImpl(size);
}
// virtual
void LLWindow::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
{
mMinWindowWidth = min_width;
mMinWindowHeight = min_height;
if (enforce_immediately)
{
LLCoordScreen cur_size;
if (!getMaximized() && getSize(&cur_size))
{
if (cur_size.mX < mMinWindowWidth || cur_size.mY < mMinWindowHeight)
{
setSizeImpl(LLCoordScreen(llmin(cur_size.mX, mMinWindowWidth), llmin(cur_size.mY, mMinWindowHeight)));
}
}
}
}
//virtual
void LLWindow::processMiscNativeEvents()
{
@@ -209,6 +257,8 @@ std::vector<std::string> LLWindow::getDynamicFallbackFontList()
return LLWindowWin32::getDynamicFallbackFontList();
#elif LL_DARWIN
return LLWindowMacOSX::getDynamicFallbackFontList();
#elif LL_MESA_HEADLESS
return std::vector<std::string>();
#elif LL_SDL
return LLWindowSDL::getDynamicFallbackFontList();
#else
@@ -350,26 +400,26 @@ LLWindow* LLWindowManager::createWindow(
#if LL_MESA_HEADLESS
new_window = new LLWindowMesaHeadless(callbacks,
title, name, x, y, width, height, flags,
fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
fullscreen, clearBg, disable_vsync, ignore_pixel_depth);
#elif LL_SDL
new_window = new LLWindowSDL(callbacks,
title, x, y, width, height, flags,
fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
fullscreen, clearBg, disable_vsync, ignore_pixel_depth, fsaa_samples);
#elif LL_WINDOWS
new_window = new LLWindowWin32(callbacks,
title, name, x, y, width, height, flags,
fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
fullscreen, clearBg, disable_vsync, ignore_pixel_depth, fsaa_samples);
#elif LL_DARWIN
new_window = new LLWindowMacOSX(callbacks,
title, name, x, y, width, height, flags,
fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
fullscreen, clearBg, disable_vsync, ignore_pixel_depth, fsaa_samples);
#endif
}
else
{
new_window = new LLWindowHeadless(callbacks,
title, name, x, y, width, height, flags,
fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth);
fullscreen, clearBg, disable_vsync, ignore_pixel_depth);
}
if (FALSE == new_window->isValid())
@@ -404,3 +454,42 @@ BOOL LLWindowManager::isWindowValid(LLWindow *window)
{
return sWindowList.find(window) != sWindowList.end();
}
//coordinate conversion utility funcs that forward to llwindow
LLCoordCommon LL_COORD_TYPE_WINDOW::convertToCommon() const
{
const LLCoordWindow& self = LLCoordWindow::getTypedCoords(*this);
LLWindow* windowp = &(*LLWindow::beginInstances());
LLCoordGL out;
windowp->convertCoords(self, &out);
return out.convert();
}
void LL_COORD_TYPE_WINDOW::convertFromCommon(const LLCoordCommon& from)
{
LLCoordWindow& self = LLCoordWindow::getTypedCoords(*this);
LLWindow* windowp = &(*LLWindow::beginInstances());
LLCoordGL from_gl(from);
windowp->convertCoords(from_gl, &self);
}
LLCoordCommon LL_COORD_TYPE_SCREEN::convertToCommon() const
{
const LLCoordScreen& self = LLCoordScreen::getTypedCoords(*this);
LLWindow* windowp = &(*LLWindow::beginInstances());
LLCoordGL out;
windowp->convertCoords(self, &out);
return out.convert();
}
void LL_COORD_TYPE_SCREEN::convertFromCommon(const LLCoordCommon& from)
{
LLCoordScreen& self = LLCoordScreen::getTypedCoords(*this);
LLWindow* windowp = &(*LLWindow::beginInstances());
LLCoordGL from_gl(from);
windowp->convertCoords(from_gl, &self);
}

View File

@@ -46,7 +46,7 @@ const S32 MIN_WINDOW_HEIGHT = 256;
// Refer to llwindow_test in test/common/llwindow for usage example
class LLWindow
class LLWindow : public LLInstanceTracker<LLWindow>
{
public:
struct LLWindowResolution
@@ -79,7 +79,9 @@ public:
virtual BOOL getSize(LLCoordScreen *size) = 0;
virtual BOOL getSize(LLCoordWindow *size) = 0;
virtual BOOL setPosition(LLCoordScreen position) = 0;
virtual BOOL setSize(LLCoordScreen size) = 0;
BOOL setSize(LLCoordScreen size);
BOOL setSize(LLCoordWindow size);
virtual void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
virtual BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) = 0;
virtual BOOL setCursorPosition(LLCoordWindow position) = 0;
virtual BOOL getCursorPosition(LLCoordWindow *position) = 0;
@@ -180,6 +182,9 @@ protected:
// Defaults to true
virtual BOOL canDelete();
virtual BOOL setSizeImpl(LLCoordScreen size) = 0;
virtual BOOL setSizeImpl(LLCoordWindow size) = 0;
protected:
LLWindowCallbacks* mCallbacks;
@@ -200,6 +205,8 @@ protected:
BOOL mHideCursorPermanent;
U32 mFlags;
U16 mHighSurrogate;
S32 mMinWindowWidth;
S32 mMinWindowHeight;
// Handle a UTF-16 encoding unit received from keyboard.
// Converting the series of UTF-16 encoding units to UTF-32 data,
@@ -283,7 +290,7 @@ extern BOOL gDebugWindowProc;
// Protocols, like "http" and "https" we support in URLs
extern const S32 gURLProtocolWhitelistCount;
extern const std::string gURLProtocolWhitelist[];
extern const std::string gURLProtocolWhitelistHandler[];
//extern const std::string gURLProtocolWhitelistHandler[];
void simpleEscapeString ( std::string& stringIn );

View File

@@ -35,7 +35,7 @@
//
LLWindowHeadless::LLWindowHeadless(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clear_background,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
BOOL disable_vsync, BOOL ignore_pixel_depth)
: LLWindow(callbacks, fullscreen, flags)
{
// Initialize a headless keyboard.

View File

@@ -46,7 +46,8 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
/*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
@@ -95,7 +96,7 @@ public:
S32 x, S32 y,
S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clear_background,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
BOOL disable_vsync, BOOL ignore_pixel_depth);
virtual ~LLWindowHeadless();
private:

View File

@@ -3,31 +3,25 @@
* @brief Prototypes for functions shared between llwindowmacosx.cpp
* and llwindowmacosx-objc.mm.
*
* $LicenseInfo:firstyear=2006&license=viewergpl$
*
* Copyright (c) 2006-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library 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
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/

View File

@@ -3,31 +3,25 @@
* @brief Definition of functions shared between llwindowmacosx.cpp
* and llwindowmacosx-objc.mm.
*
* $LicenseInfo:firstyear=2006&license=viewergpl$
*
* Copyright (c) 2006-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library 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
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/

View File

@@ -210,7 +210,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl,
BOOL disable_vsync,
BOOL ignore_pixel_depth,
U32 fsaa_samples)
: LLWindow(NULL, fullscreen, flags)
@@ -1256,7 +1256,7 @@ BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
return TRUE;
}
BOOL LLWindowMacOSX::setSize(const LLCoordScreen size)
BOOL LLWindowMacOSX::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@@ -1266,6 +1266,31 @@ BOOL LLWindowMacOSX::setSize(const LLCoordScreen size)
return TRUE;
}
BOOL LLWindowMacOSX::setSizeImpl(const LLCoordWindow size)
{
Rect client_rect;
if (mWindow)
{
OSStatus err = GetWindowBounds(mWindow, kWindowContentRgn, &client_rect);
if (err == noErr)
{
client_rect.right = client_rect.left + size.mX;
client_rect.bottom = client_rect.top + size.mY;
err = SetWindowBounds(mWindow, kWindowContentRgn, &client_rect);
}
if (err == noErr)
{
return TRUE;
}
else
{
llinfos << "Error setting size" << err << llendl;
return FALSE;
}
}
return FALSE;
}
void LLWindowMacOSX::swapBuffers()
{
aglSwapBuffers(mContext);
@@ -2546,6 +2571,9 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
{
// This is where we would constrain move/resize to a particular screen
const S32 MIN_WIDTH = mMinWindowWidth;
const S32 MIN_HEIGHT = mMinWindowHeight;
Rect currentBounds;
Rect previousBounds;
@@ -2570,14 +2598,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
mPreviousWindowRect = previousBounds;
}
if ((currentBounds.right - currentBounds.left) < MIN_WINDOW_WIDTH)
if ((currentBounds.right - currentBounds.left) < MIN_WIDTH)
{
currentBounds.right = currentBounds.left + MIN_WINDOW_WIDTH;
currentBounds.right = currentBounds.left + MIN_WIDTH;
}
if ((currentBounds.bottom - currentBounds.top) < MIN_WINDOW_HEIGHT)
if ((currentBounds.bottom - currentBounds.top) < MIN_HEIGHT)
{
currentBounds.bottom = currentBounds.top + MIN_WINDOW_HEIGHT;
currentBounds.bottom = currentBounds.top + MIN_HEIGHT;
}
SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), &currentBounds);

View File

@@ -58,7 +58,8 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSize(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -123,7 +124,7 @@ public:
protected:
LLWindowMacOSX(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync,
BOOL ignore_pixel_depth,
U32 fsaa_samples);
~LLWindowMacOSX();

View File

@@ -41,28 +41,25 @@ U16 *gMesaBuffer = NULL;
LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
BOOL disable_vsync, BOOL ignore_pixel_depth)
: LLWindow(callbacks, fullscreen, flags)
{
if (use_gl)
llinfos << "MESA Init" << llendl;
mMesaContext = OSMesaCreateContextExt( GL_RGBA, 32, 0, 0, NULL );
/* Allocate the image buffer */
mMesaBuffer = new unsigned char [width * height * 4 * MESA_CHANNEL_SIZE];
llassert(mMesaBuffer);
gMesaBuffer = (U16*)mMesaBuffer;
/* Bind the buffer to the context and make it current */
if (!OSMesaMakeCurrent( mMesaContext, mMesaBuffer, MESA_CHANNEL_TYPE, width, height ))
{
llinfos << "MESA Init" << llendl;
mMesaContext = OSMesaCreateContextExt( GL_RGBA, 32, 0, 0, NULL );
/* Allocate the image buffer */
mMesaBuffer = new unsigned char [width * height * 4 * MESA_CHANNEL_SIZE];
llassert(mMesaBuffer);
gMesaBuffer = (U16*)mMesaBuffer;
/* Bind the buffer to the context and make it current */
if (!OSMesaMakeCurrent( mMesaContext, mMesaBuffer, MESA_CHANNEL_TYPE, width, height ))
{
llerrs << "MESA: OSMesaMakeCurrent failed!" << llendl;
}
llverify(gGLManager.initGL());
llerrs << "MESA: OSMesaMakeCurrent failed!" << llendl;
}
llverify(gGLManager.initGL());
}

View File

@@ -50,7 +50,8 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
/*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
@@ -97,7 +98,7 @@ public:
LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
BOOL disable_vsync, BOOL ignore_pixel_depth);
~LLWindowMesaHeadless();
private:

View File

@@ -189,7 +189,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl,
BOOL disable_vsync,
BOOL ignore_pixel_depth, U32 fsaa_samples)
: LLWindow(callbacks, fullscreen, flags),
Lock_Display(NULL),
@@ -200,7 +200,6 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
gKeyboard->setCallbacks(callbacks);
// Note that we can't set up key-repeat until after SDL has init'd video
// Ignore use_gl for now, only used for drones on PC
mWindow = NULL;
mNeedsResize = FALSE;
mOverrideAspectRatio = 0.f;
@@ -975,7 +974,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
return TRUE;
}
BOOL LLWindowSDL::setSize(const LLCoordScreen size)
BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@@ -993,6 +992,25 @@ BOOL LLWindowSDL::setSize(const LLCoordScreen size)
return FALSE;
}
BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size)
{
if(mWindow)
{
// Push a resize event onto SDL's queue - we'll handle it
// when it comes out again.
SDL_Event event;
event.type = SDL_VIDEORESIZE;
event.resize.w = size.mX;
event.resize.h = size.mY;
SDL_PushEvent(&event); // copied into queue
return TRUE;
}
return FALSE;
}
void LLWindowSDL::swapBuffers()
{
if (mWindow)
@@ -1045,6 +1063,25 @@ void LLWindowSDL::setMouseClipping( BOOL b )
//SDL_WM_GrabInput(b ? SDL_GRAB_ON : SDL_GRAB_OFF);
}
// virtual
void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
{
LLWindow::setMinSize(min_width, min_height, enforce_immediately);
#if LL_X11
// Set the minimum size limits for X11 window
// so the window manager doesn't allow resizing below those limits.
XSizeHints* hints = XAllocSizeHints();
hints->flags |= PMinSize;
hints->min_width = mMinWindowWidth;
hints->min_height = mMinWindowHeight;
XSetWMNormalHints(mSDL_Display, mSDL_XWindowID, hints);
XFree(hints);
#endif
}
BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position)
{
BOOL result = TRUE;
@@ -1859,8 +1896,8 @@ void LLWindowSDL::gatherInput()
llinfos << "Handling a resize event: " << event.resize.w <<
"x" << event.resize.h << llendl;
S32 width = llmax(event.resize.w, MIN_WINDOW_WIDTH);
S32 height = llmax(event.resize.h, MIN_WINDOW_HEIGHT);
S32 width = llmax(event.resize.w, (S32)mMinWindowWidth);
S32 height = llmax(event.resize.h, (S32)mMinWindowHeight);
if (width != mWindow->w || height != mWindow->h)
{
@@ -2488,6 +2525,23 @@ void exec_cmd(const std::string& cmd, const std::string& arg)
// Must begin with protocol identifier.
void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
{
bool found = false;
S32 i;
for (i = 0; i < gURLProtocolWhitelistCount; i++)
{
if (escaped_url.find(gURLProtocolWhitelist[i]) != std::string::npos)
{
found = true;
break;
}
}
if (!found)
{
llwarns << "spawn_web_browser called for url with protocol not on whitelist: " << escaped_url << llendl;
return;
}
llinfos << "spawn_web_browser: " << escaped_url << llendl;
#if LL_LINUX || LL_SOLARIS
@@ -2623,9 +2677,9 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
if (sortpat)
{
// Sort the list of system fonts from most-to-least-desirable.
FcResult fresult;
FcResult result;
fs = FcFontSort(NULL, sortpat, elide_unicode_coverage,
NULL, &fresult);
NULL, &result);
FcPatternDestroy(sortpat);
}

View File

@@ -63,7 +63,8 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSize(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -76,6 +77,7 @@ public:
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
/*virtual*/ void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
@@ -147,7 +149,7 @@ public:
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync,
BOOL ignore_pixel_depth, U32 fsaa_samples);
~LLWindowSDL();

View File

@@ -363,11 +363,15 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width,
S32 height, U32 flags,
BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl,
BOOL disable_vsync,
BOOL ignore_pixel_depth,
U32 fsaa_samples)
: LLWindow(callbacks, fullscreen, flags)
{
//MAINT-516 -- force a load of opengl32.dll just in case windows went sideways
LoadLibrary(L"opengl32.dll");
mFSAASamples = fsaa_samples;
mIconResource = gIconResource;
mOverrideAspectRatio = 0.f;
@@ -860,13 +864,11 @@ BOOL LLWindowWin32::setPosition(const LLCoordScreen position)
return FALSE;
}
getSize(&size);
moveWindow(position, size);
return TRUE;
}
BOOL LLWindowWin32::setSize(const LLCoordScreen size)
BOOL LLWindowWin32::setSizeImpl(const LLCoordScreen size)
{
LLCoordScreen position;
@@ -876,11 +878,30 @@ BOOL LLWindowWin32::setSize(const LLCoordScreen size)
return FALSE;
}
moveWindow(position, size);
WINDOWPLACEMENT placement;
placement.length = sizeof(WINDOWPLACEMENT);
if (!GetWindowPlacement(mWindowHandle, &placement)) return FALSE;
placement.showCmd = SW_RESTORE;
if (!SetWindowPlacement(mWindowHandle, &placement)) return FALSE;
moveWindow(position, size);
return TRUE;
}
BOOL LLWindowWin32::setSizeImpl(const LLCoordWindow size)
{
RECT window_rect = {0, 0, size.mX, size.mY };
DWORD dw_ex_style = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
DWORD dw_style = WS_OVERLAPPEDWINDOW;
AdjustWindowRectEx(&window_rect, dw_style, FALSE, dw_ex_style);
return setSizeImpl(LLCoordScreen(window_rect.right - window_rect.left, window_rect.bottom - window_rect.top));
}
// changing fullscreen resolution
BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp)
{
@@ -891,12 +912,12 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
DWORD current_refresh;
DWORD dw_ex_style;
DWORD dw_style;
RECT window_rect;
RECT window_rect = {0, 0, 0, 0};
S32 width = size.mX;
S32 height = size.mY;
BOOL auto_show = FALSE;
if (mhRC)
if (mhRC)
{
auto_show = TRUE;
resetDisplayResolution();
@@ -1093,6 +1114,37 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
return FALSE;
}
// (EXP-1765) dump pixel data to see if there is a pattern that leads to unreproducible crash
LL_INFOS("Window") << "--- begin pixel format dump ---" << llendl ;
LL_INFOS("Window") << "pixel_format is " << pixel_format << llendl ;
LL_INFOS("Window") << "pfd.nSize: " << pfd.nSize << llendl ;
LL_INFOS("Window") << "pfd.nVersion: " << pfd.nVersion << llendl ;
LL_INFOS("Window") << "pfd.dwFlags: 0x" << std::hex << pfd.dwFlags << std::dec << llendl ;
LL_INFOS("Window") << "pfd.iPixelType: " << (int)pfd.iPixelType << llendl ;
LL_INFOS("Window") << "pfd.cColorBits: " << (int)pfd.cColorBits << llendl ;
LL_INFOS("Window") << "pfd.cRedBits: " << (int)pfd.cRedBits << llendl ;
LL_INFOS("Window") << "pfd.cRedShift: " << (int)pfd.cRedShift << llendl ;
LL_INFOS("Window") << "pfd.cGreenBits: " << (int)pfd.cGreenBits << llendl ;
LL_INFOS("Window") << "pfd.cGreenShift: " << (int)pfd.cGreenShift << llendl ;
LL_INFOS("Window") << "pfd.cBlueBits: " << (int)pfd.cBlueBits << llendl ;
LL_INFOS("Window") << "pfd.cBlueShift: " << (int)pfd.cBlueShift << llendl ;
LL_INFOS("Window") << "pfd.cAlphaBits: " << (int)pfd.cAlphaBits << llendl ;
LL_INFOS("Window") << "pfd.cAlphaShift: " << (int)pfd.cAlphaShift << llendl ;
LL_INFOS("Window") << "pfd.cAccumBits: " << (int)pfd.cAccumBits << llendl ;
LL_INFOS("Window") << "pfd.cAccumRedBits: " << (int)pfd.cAccumRedBits << llendl ;
LL_INFOS("Window") << "pfd.cAccumGreenBits: " << (int)pfd.cAccumGreenBits << llendl ;
LL_INFOS("Window") << "pfd.cAccumBlueBits: " << (int)pfd.cAccumBlueBits << llendl ;
LL_INFOS("Window") << "pfd.cAccumAlphaBits: " << (int)pfd.cAccumAlphaBits << llendl ;
LL_INFOS("Window") << "pfd.cDepthBits: " << (int)pfd.cDepthBits << llendl ;
LL_INFOS("Window") << "pfd.cStencilBits: " << (int)pfd.cStencilBits << llendl ;
LL_INFOS("Window") << "pfd.cAuxBuffers: " << (int)pfd.cAuxBuffers << llendl ;
LL_INFOS("Window") << "pfd.iLayerType: " << (int)pfd.iLayerType << llendl ;
LL_INFOS("Window") << "pfd.bReserved: " << (int)pfd.bReserved << llendl ;
LL_INFOS("Window") << "pfd.dwLayerMask: " << pfd.dwLayerMask << llendl ;
LL_INFOS("Window") << "pfd.dwVisibleMask: " << pfd.dwVisibleMask << llendl ;
LL_INFOS("Window") << "pfd.dwDamageMask: " << pfd.dwDamageMask << llendl ;
LL_INFOS("Window") << "--- end pixel format dump ---" << llendl ;
if (pfd.cColorBits < 32)
{
close();
@@ -1564,7 +1616,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
}
else
{
llinfos << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) << " context." << llendl;
llinfos << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) <<
(LLRender::sGLCoreProfile ? " core" : " compatibility") << " context." << llendl;
done = true;
if (LLRender::sGLCoreProfile)
@@ -1675,24 +1728,15 @@ void LLWindowWin32::moveWindow( const LLCoordScreen& position, const LLCoordScre
BOOL LLWindowWin32::setCursorPosition(const LLCoordWindow position)
{
LLCoordScreen screen_pos;
mMousePositionModified = TRUE;
if (!mWindowHandle)
{
return FALSE;
}
if (!convertCoords(position, &screen_pos))
{
return FALSE;
}
// Inform the application of the new mouse position (needed for per-frame
// hover/picking to function).
LLCoordGL gl_pos;
convertCoords(position, &gl_pos);
mCallbacks->handleMouseMove(this, gl_pos, (MASK)0);
mCallbacks->handleMouseMove(this, position.convert(), (MASK)0);
// DEV-18951 VWR-8524 Camera moves wildly when alt-clicking.
// Because we have preemptively notified the application of the new
@@ -1702,24 +1746,23 @@ BOOL LLWindowWin32::setCursorPosition(const LLCoordWindow position)
while (PeekMessage(&msg, NULL, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE))
{ }
return SetCursorPos(screen_pos.mX, screen_pos.mY);
LLCoordScreen screen_pos(position.convert());
return ::SetCursorPos(screen_pos.mX, screen_pos.mY);
}
BOOL LLWindowWin32::getCursorPosition(LLCoordWindow *position)
{
POINT cursor_point;
LLCoordScreen screen_pos;
if (!mWindowHandle ||
!GetCursorPos(&cursor_point))
if (!mWindowHandle
|| !GetCursorPos(&cursor_point)
|| !position)
{
return FALSE;
}
screen_pos.mX = cursor_point.x;
screen_pos.mY = cursor_point.y;
return convertCoords(screen_pos, position);
*position = LLCoordScreen(cursor_point.x, cursor_point.y).convert();
return TRUE;
}
void LLWindowWin32::hideCursor()
@@ -1880,7 +1923,7 @@ void LLWindowWin32::gatherInput()
MSG msg;
int msg_count = 0;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) && msg_count < MAX_MESSAGE_PER_UPDATE)
while ((msg_count < MAX_MESSAGE_PER_UPDATE) && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput");
TranslateMessage(&msg);
@@ -1936,6 +1979,10 @@ static LLFastTimer::DeclareTimer FTM_MOUSEHANDLER("Handle Mouse");
LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param)
{
// Ignore clicks not originated in the client area, i.e. mouse-up events not preceded with a WM_LBUTTONDOWN.
// This helps prevent avatar walking after maximizing the window by double-clicking the title bar.
static bool sHandleLeftMouseUp = true;
LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA);
@@ -2282,10 +2329,20 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->handleUnicodeUTF16((U16)w_param, gKeyboard->currentMask(FALSE));
return 0;
case WM_NCLBUTTONDOWN:
{
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_NCLBUTTONDOWN");
// A click in a non-client area, e.g. title bar or window border.
sHandleLeftMouseUp = false;
}
break;
case WM_LBUTTONDOWN:
{
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONDOWN");
LLFastTimer t2(FTM_MOUSEHANDLER);
sHandleLeftMouseUp = true;
if (LLWinImm::isAvailable() && window_imp->mPreeditor)
{
window_imp->interruptLanguageTextInput();
@@ -2296,15 +2353,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2326,15 +2383,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2350,6 +2407,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
{
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONUP");
LLFastTimer t2(FTM_MOUSEHANDLER);
if (!sHandleLeftMouseUp)
{
sHandleLeftMouseUp = true;
break;
}
//if (gDebugClicks)
//{
// LL_INFOS("Window") << "WndProc left button up" << LL_ENDL;
@@ -2359,15 +2423,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2394,15 +2458,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2423,15 +2487,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2458,15 +2522,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2487,15 +2551,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
// If we don't do this, many clicks could get buffered up, and if the
// first click changes the cursor position, all subsequent clicks
// will occur at the wrong location. JC
LLCoordWindow cursor_coord_window;
if (window_imp->mMousePositionModified)
{
LLCoordWindow cursor_coord_window;
window_imp->getCursorPosition(&cursor_coord_window);
window_imp->convertCoords(cursor_coord_window, &gl_coord);
gl_coord = cursor_coord_window.convert();
}
else
{
window_imp->convertCoords(window_coord, &gl_coord);
gl_coord = window_coord.convert();
}
MASK mask = gKeyboard->currentMask(TRUE);
// generate move event to update mouse coordinates
@@ -2567,17 +2631,16 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_MOUSEMOVE:
{
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MOUSEMOVE");
window_imp->convertCoords(window_coord, &gl_coord);
MASK mask = gKeyboard->currentMask(TRUE);
window_imp->mCallbacks->handleMouseMove(window_imp, gl_coord, mask);
window_imp->mCallbacks->handleMouseMove(window_imp, window_coord.convert(), mask);
return 0;
}
case WM_GETMINMAXINFO:
{
LPMINMAXINFO min_max = (LPMINMAXINFO)l_param;
min_max->ptMinTrackSize.x = MIN_WINDOW_WIDTH;
min_max->ptMinTrackSize.y = MIN_WINDOW_HEIGHT;
min_max->ptMinTrackSize.x = window_imp->mMinWindowWidth;
min_max->ptMinTrackSize.y = window_imp->mMinWindowHeight;
return 0;
}
@@ -3483,7 +3546,7 @@ void LLWindowWin32::setLanguageTextInput( const LLCoordGL & position )
LLWinImm::setCompositionWindow( himc, &ime_form );
sWinIMEWindowPosition.set( win_pos.mX, win_pos.mY );
sWinIMEWindowPosition = win_pos;
}
LLWinImm::releaseContext(mWindowHandle, himc);

View File

@@ -57,7 +57,8 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
/*virtual*/ BOOL setSize(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -120,7 +121,7 @@ public:
protected:
LLWindowWin32(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync, BOOL use_gl,
BOOL fullscreen, BOOL clearBg, BOOL disable_vsync,
BOOL ignore_pixel_depth, U32 fsaa_samples);
~LLWindowWin32();