diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-12-04 13:58:12 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-12-04 16:48:50 +0800 |
| commit | e3a35af2c676fb211ff7d01a79eb1a3299bc82f3 (patch) | |
| tree | 0ff7a0a15d1a53850399250b65f0a2a42f7bbf22 /indra/llwindow | |
| parent | ac052bed7f9f97efc63f0a0322214d4dcdcd5664 (diff) | |
| parent | c4ec3d866082d588de671e833413474d7ab19524 (diff) | |
Merge remote-tracking branch 'secondlife/release/2026.01' into 2026.01
Diffstat (limited to 'indra/llwindow')
| -rw-r--r-- | indra/llwindow/llappdelegate-objc.h | 11 | ||||
| -rw-r--r-- | indra/llwindow/llkeyboard.cpp | 2 | ||||
| -rw-r--r-- | indra/llwindow/llkeyboard.h | 5 | ||||
| -rw-r--r-- | indra/llwindow/llkeyboardsdl.cpp | 1 | ||||
| -rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 3 | ||||
| -rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 19 |
6 files changed, 19 insertions, 22 deletions
diff --git a/indra/llwindow/llappdelegate-objc.h b/indra/llwindow/llappdelegate-objc.h index ef36f7d4a8..5b6e11e4e4 100644 --- a/indra/llwindow/llappdelegate-objc.h +++ b/indra/llwindow/llappdelegate-objc.h @@ -36,16 +36,17 @@ std::string secondLogPath; } -@property (assign) IBOutlet LLNSWindow *window; -@property (assign) IBOutlet NSWindow *inputWindow; -@property (assign) IBOutlet LLNonInlineTextView *inputView; +@property (assign) IBOutlet LLNSWindow * _Nullable window; +@property (assign) IBOutlet NSWindow * _Nullable inputWindow; +@property (assign) IBOutlet LLNonInlineTextView * _Nullable inputView; -@property (retain) NSString *currentInputLanguage; +@property (retain) NSString * _Nullable currentInputLanguage; - (void) oneFrame; -- (void) showInputWindow:(bool)show withEvent:(NSEvent*)textEvent; +- (void) showInputWindow:(bool)show withEvent:(nullable NSEvent *)textEvent; - (void) languageUpdated; - (bool) romanScript; +- (void) setBugsplatValue:(nullable NSString *)value forAttribute:(nullable NSString *)attribute; @end @interface LLApplication : NSApplication diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index a16c0a318a..d9c1a9cf7d 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -30,6 +30,8 @@ #include "llwindowcallbacks.h" +#include "llstl.h" + // // Globals // diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index a527227672..808be7b245 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -27,10 +27,9 @@ #ifndef LL_LLKEYBOARD_H #define LL_LLKEYBOARD_H +#include <functional> #include <map> -#include <boost/function.hpp> -#include "llstringtable.h" #include "lltimer.h" #include "indra_constants.h" @@ -41,7 +40,7 @@ enum EKeystate KEYSTATE_UP }; -typedef boost::function<bool(EKeystate keystate)> LLKeyFunc; +typedef std::function<bool(EKeystate keystate)> LLKeyFunc; typedef std::string (LLKeyStringTranslatorFunc)(std::string_view); enum EKeyboardInsertMode diff --git a/indra/llwindow/llkeyboardsdl.cpp b/indra/llwindow/llkeyboardsdl.cpp index 72b4577276..c8805300cb 100644 --- a/indra/llwindow/llkeyboardsdl.cpp +++ b/indra/llwindow/llkeyboardsdl.cpp @@ -23,6 +23,7 @@ * $/LicenseInfo$ */ +#include <set> #include "linden_common.h" #include "llkeyboardsdl.h" #include "llwindowcallbacks.h" diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 0bf1c4b057..42250535f0 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1262,9 +1262,6 @@ bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position) // trigger mouse move callback LLCoordGL gl_pos; convertCoords(position, &gl_pos); - float scale = getSystemUISize(); - gl_pos.mX *= scale; - gl_pos.mY *= scale; mCallbacks->handleMouseMove(this, gl_pos, (MASK)0); return result; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 5471e1c87a..8edaa920bb 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2504,16 +2504,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // Comes after WM_QUERYENDSESSION LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_ENDSESSION"); LL_INFOS("Window") << "Received WM_ENDSESSION with wParam: " << (U32)w_param << " lParam: " << (U32)l_param << LL_ENDL; - unsigned int end_session_flags = (U32)w_param; - if (end_session_flags == 0) - { - // session is not actually ending - return 0; - } + unsigned int end_session_flags = (U32)l_param; - if ((end_session_flags & ENDSESSION_CLOSEAPP) - || (end_session_flags & ENDSESSION_CRITICAL) - || (end_session_flags & ENDSESSION_LOGOFF)) + if (w_param == TRUE // if true, session is ending + || end_session_flags == 0 // not possible to determine type of the event + // || (end_session_flags & ENDSESSION_CLOSEAPP)) system update or low resources, must be acompanied by w_param == TRUE + || (end_session_flags & ENDSESSION_CRITICAL) // will shutdown regardless of app state + || (end_session_flags & ENDSESSION_LOGOFF)) // logoff, can delay shutdown { window_imp->post([=]() { @@ -2522,13 +2519,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ { // Get the app to initiate cleanup. window_imp->mCallbacks->handleQuit(window_imp); - // The app is responsible for calling destroyWindow when done with GL } }); // Give app a second to finish up. That's not enough for a clean exit, // but better than nothing. // Todo: sync this better, some kind of waitForResult? Can't wait forever, - // but can potentially use ShutdownBlockReasonCreate for a bigger delay. + // but for ENDSESSION_LOGOFF can potentially use ShutdownBlockReasonCreate + // for a bigger delay. ms_sleep(1000); } // Don't need to post quit or destroy window, |
