Commit Graph

495 Commits (5dcd81c15507ad8f487e5727bc7a94de82f6fb45)

Author SHA1 Message Date
Nat Goodspeed 464a0df4c1 DRTVWR-418: Unify control flow through LLAppViewer across platforms.
The LLApp API used to consist of init(), mainLoop(), cleanup() methods. This
makes sense -- but on Mac that structure was being subverted. The method
called mainLoop() was in fact being called once per frame. There was
initialization code in the method, which (on Mac) needed to be skipped with an
already-initialized bool. There was a 'while' loop which (on Mac) needed to be
turned into an 'if' instead so the method would return after every frame.

Rename LLApp::mainLoop() to frame(). Propagate through subclasses LLAppViewer
and LLCrashLogger. Document the fact that frame() returns true to mean "done."
(This was always the case, but had to be inferred from the code.)

Rename the Mac Objective-C function mainLoop to oneFrame. Rename the C++ free
function it calls from runMainLoop() to pumpMainLoop(). Add comments to
llappdelegate-objc.mm explaining (inferred) control flow.

Change the Linux viewer main() and the Windows viewer WINMAIN() from a single
LLAppViewer::mainLoop() call to repeatedly call frame() until it returns true.

Move initialization code from the top of LLAppViewer::frame() to the init()
method, where it more properly belongs. Remove corresponding
mMainLoopInitialized flag (and all references) from LLAppViewer.

Remove 'while (! LLApp::isExiting())' (or on Mac, 'if (! LLApp::isExiting())')
from LLAppViewer::frame() -- thus unindenting the whole body of the 'while'
and causing many lines of apparent change. (Apologies to reviewers.)

There are four LLApp states: APP_STATUS_RUNNING, APP_STATUS_QUITTING,
APP_STATUS_STOPPED and APP_STATUS_ERROR. Change LLAppViewer::frame() return
value from (isExiting()) (QUITTING or ERROR) to (! isRunning()). I do not know
under what circumstances the state might transition to STOPPED during a
frame() call, but I'm quite sure that if it does, we don't want to call
frame() again. We only want a subsequent call if the state is RUNNING.

Also rename mainLoop() method in LLCrashLogger subclasses
LLCrashLoggerWindows, LLCrashLoggerMac, LLCrashLoggerLinux. Of course it's
completely up to the frame() method whether to yield control; none of those in
fact do. Honor protocol by returning true (frame() is done), even though each
one's main() caller ignores the return value.

In fact LLCrashLoggerWindows::mainLoop() wasn't using the return protocol
correctly anyway, returning wParam or 0 or 1 -- possibly because the return
protocol was never explicitly documented. It should always return true: "I'm
done, don't call me again."
2016-06-30 16:51:50 -04:00
Oz Linden 950c41d184 merge 4.0.4-release and MAINT-5974 2016-05-06 10:28:42 -04:00
AndreyL ProductEngine 56f736b654 Merged in cinderblocks/storm-2127 2016-04-21 22:48:32 +03:00
Cinder c2c0c537bb STORM-2127 - Fix NSException when assigning values that don't exist in cocoa modifier key event. 2016-04-20 16:13:17 -06:00
Mnikolenko ProductEngine c7e2c496ab MAINT-6294 FIXED Cursor became invisible after typing in any input field (OS X) 2016-04-07 11:28:37 +03:00
Mnikolenko ProductEngine 272d40a089 MAINT-6239 [Mac] Computer cursor appears attached to crosshair after using modifier keys in mouselook 2016-03-29 13:30:00 +03:00
Mnikolenko ProductEngine ca1d7da571 MAINT-3171 Alt-clicking while moving mouse can move the camera significantly 2016-03-21 17:58:39 +02:00
Mnikolenko ProductEngine 9ed050e0e0 MAINT-3171 WIP Alt-clicking while moving mouse can move the camera significantly 2016-03-10 14:31:16 +02:00
Oz Linden bc22e58743 merge changes for 4.0.1-release 2016-01-15 16:55:04 -05:00
rider eb484d5051 MAINT-5909: Enable unicode text input on mac and feed that directly into the viewer. Windows fixes still required. 2015-12-03 13:32:06 -08:00
rider c2ad041c23 Encode keyboard event for reconstruction in the plugin. 2015-11-13 16:22:34 -08:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
rider 5449ae73b3 MAINT-5754: Finish key modifier experiment. Still not working. 2015-11-07 12:09:08 -08:00
rider bd817f6f42 MAINT-5754: Basic keyboard functionality on the Mac. Still incomplete 2015-11-06 14:12:30 -08:00
Rider Linden 9833a50260 MAINT-5754: For MoaP and MediaCtrls forward all events including KEYUP and KEYDOWN to the CEF plugin. 2015-10-27 15:17:12 -07:00
callum_linden 6599e10d00 Merge with tip of viewer-release 2015-10-20 16:39:00 -07:00
pavelkproductengine 3732e0b4d2 merge changes for MAINT-4734 2015-10-13 20:20:09 +03:00
callum_linden 6765d66637 Merge with viewer-xcode-7 for Xcode 7 patches 2015-09-29 13:35:41 -07:00
callum_linden 17ff449ae6 Supress error after Xcode 7 update: error: null passed to a callee that requires a non-null argument 2015-09-18 15:07:27 -07:00
callum_linden 1db2c7276d Merge with viewer-release 2015-08-31 11:17:28 -07:00
callum_linden 83a9ae7b3c New keyboard code for windows that uses system messages directly and works ok. Points to new LLCEFLib 2015-07-15 02:27:33 +01:00
AndreyL ProductEngine 078612e292 MAINT-5019 FIXED Additional cases 2015-07-14 04:39:20 +03:00
Mnikolenko ProductEngine 89321a56fd increment viewer version to 3.7.29 2015-04-28 12:03:31 +03:00
pavelk_productengine e92e72ff3a MAINT-5106 FIXED [MAC] if SL viewer is not running, clicking on SLURL launches viewer, BUT start location is not set 2015-04-24 23:24:44 +03:00
Mnikolenko ProductEngine bb87365c37 Merge viewer-release, become version 3.7.29 2015-04-28 13:36:35 +03:00
Oz Linden a8ef252571 merge changes for 3.7.27-release 2015-04-13 16:23:36 -04:00
ruslantproductengine 90573badb4 MAINT-3585 FIXED (Crashes when attempting to upload image.) 2015-03-30 20:11:27 +03:00
ruslantproductengine a6ff7db101 MAINT-3585 FIXED (Crashes when attempting to upload image.) 2015-03-30 20:11:27 +03:00
andreykproductengine de5307ab1d MAINT-4874 FIXED Actions that require a double click "randomly" fail - repro & cause found for BUG-7753 2015-03-05 19:03:23 +02:00
Oz Linden 905431cf60 merge changes for 3.7.25-release 2015-02-24 15:48:28 -05:00
Oz Linden 6f3cf79a3a merge changes for 3.7.24-release 2015-01-13 13:46:45 -05:00
Oz Linden dab5acd972 merge changes for 3.7.22-release 2014-12-15 12:34:18 -05:00
callum_linden 4c597c548f Fix up remaining llround() -> ll_round() issues 2014-12-12 11:03:56 -08:00
simon 4f076daeff Merge downstream code and become 3.7.22 2014-12-02 10:41:20 -08:00
Brad Payne (Vir Linden) 6cffbfba8b merge 2014-12-02 14:48:45 -05:00
Brad Payne (Vir Linden) fe5ff3e74a merge 2014-12-01 16:21:52 -05:00
ruslantproductengine 799d13269a MAINT-3585 FIXED Viewer Crashes when attempting to upload image.
The bug was fixed, the reasone of crash is following. The Core Flow view
contain another GL context and will not care about restoring a previous.
I restore context manually.
This path also contain a minor changes in another files.

All changes described here.

Сhange's for fix current bug.
indra/llwindow/llwindow.h
indra/llwindow/llwindowheadless.h
indra/llwindow/llwindowmacosx.h
indra/llwindow/llwindowsdl.h
indra/llwindow/llwindowwin32.h
indra/newview/lllocalbitmaps.cpp
indra/newview/llviewerdisplay.cpp
indra/newview/llviewerdisplay.h

Twice mUsage initialization (replace to forward initialization).
indra/llcharacter/lljointstate.h

Looks like condition should be befor memcopy call, otherwise - possible CRASH.
indra/llcommon/llmd5.cpp

Unused condition and variables.
indra/llmath/llsphere.cpp

Looks like should be under if otherwise - possible CRASH
indra\llprimitive\llmodel.cpp

Useless assert's.
indra/llrender/llrender.cpp
indra/newview/lldaycyclemanager.cpp
2014-11-03 20:05:20 +02:00
Oz Linden a837281a77 merge changes for STORM-2081 2014-10-23 16:07:31 -04:00
Cinder 47854b6218 STORM-2081 - Guard against null gWindowImplementation when fullscreen (crashes OS X Yosemite) 2014-10-23 12:45:05 -06:00
callum_linden 392d63efac Update to build on Xcode 6.0: more removal of unused variables [-Wunused-variable] 2014-10-17 15:39:48 -07:00
callum_linden 73224a952a Update to build on Xcode 6.0: fix deprecated constant in OS X land 2014-10-17 15:39:13 -07:00
Oz Linden e43f3f4dae merge changes for OPEN-215 2014-10-13 17:21:22 -04:00
Oz Linden 852426d71e merge changes for 3.7.17-release 2014-10-13 17:13:15 -04:00
Mnikolenko ProductEngine b75d2f7c3f MAINT-3666 FIXED Update modifiers when viewer window becomes key window 2014-09-12 11:30:52 +03:00
Mnikolenko ProductEngine c62ac0cae7 MAINT-3569 FIXED Handle window hide/unhide and minimize/unminimize events on mac. 2014-09-11 11:59:19 +03:00
Mnikolenko ProductEngine 7d9372b96d MAINT-4323 FIXED Mouselook - right-click locks cam position (mac-only) 2014-09-04 14:13:47 +03:00
Pell Smit ce7e8eb952 fixed: bad behavior of input window 2014-08-14 15:19:19 +09:00
Pell Smit ebd94bf07a fixed: unwanted input window on OSX 2014-08-15 03:52:22 +09:00
Pell Smit bef17f2af7 fixed: modifier key bug 2014-08-14 15:21:53 +09:00
Pell Smit e2370f6f2d fixed: inline backspace bug 2014-08-14 15:20:58 +09:00