Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
936a1e36
Commit
936a1e36
authored
15 years ago
by
Steven Bennetts
Browse files
Options
Downloads
Patches
Plain Diff
merge -r 129526 skinning-19 -> viewer-2.0.0-3
Cherry pick a fix to enable IM windows.
parent
85f94009
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llui/llfocusmgr.cpp
+36
-8
36 additions, 8 deletions
indra/llui/llfocusmgr.cpp
indra/llui/llfocusmgr.h
+4
-0
4 additions, 0 deletions
indra/llui/llfocusmgr.h
with
40 additions
and
8 deletions
indra/llui/llfocusmgr.cpp
+
36
−
8
View file @
936a1e36
...
@@ -98,8 +98,6 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke
...
@@ -98,8 +98,6 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke
return
;
return
;
}
}
//llinfos << "Keyboard focus handled by " << (new_focus ? new_focus->getName() : "nothing") << llendl;
mKeystrokesOnly
=
keystrokes_only
;
mKeystrokesOnly
=
keystrokes_only
;
if
(
new_focus
!=
mKeyboardFocus
)
if
(
new_focus
!=
mKeyboardFocus
)
...
@@ -107,17 +105,47 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke
...
@@ -107,17 +105,47 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke
mLastKeyboardFocus
=
mKeyboardFocus
;
mLastKeyboardFocus
=
mKeyboardFocus
;
mKeyboardFocus
=
new_focus
;
mKeyboardFocus
=
new_focus
;
if
(
mLastKeyboardFocus
)
view_handle_list_t
new_focus_list
;
// walk up the tree to root and add all views to the new_focus_list
for
(
LLView
*
ctrl
=
mKeyboardFocus
;
ctrl
&&
ctrl
!=
LLUI
::
getRootView
();
ctrl
=
ctrl
->
getParent
())
{
{
mLastKeyboardFocus
->
onFocusLost
();
if
(
ctrl
)
{
new_focus_list
.
push_front
(
ctrl
->
getHandle
());
}
}
}
// clear out any existing flash
view_handle_list_t
::
iterator
new_focus_iter
=
new_focus_list
.
begin
();
if
(
new_focus
)
view_handle_list_t
::
iterator
old_focus_iter
=
mCachedKeyboardFocusList
.
begin
();
// compare the new focus sub-tree to the old focus sub-tree
// iterate through the lists in lockstep until we get to a non-common ancestor
while
((
new_focus_iter
!=
new_focus_list
.
end
())
&&
(
old_focus_iter
!=
mCachedKeyboardFocusList
.
end
())
&&
((
*
new_focus_iter
)
==
(
*
old_focus_iter
)))
{
{
mFocusWeight
=
0.
f
;
new_focus_iter
++
;
new
_focus
->
onFocusReceived
()
;
old
_focus
_iter
++
;
}
}
// call onFocusLost on all remaining in the old focus list
while
(
old_focus_iter
!=
mCachedKeyboardFocusList
.
end
())
{
old_focus_iter
->
get
()
->
onFocusLost
();
old_focus_iter
++
;
}
// call onFocusReceived on all remaining in the new focus list
while
(
new_focus_iter
!=
new_focus_list
.
end
())
{
new_focus_iter
->
get
()
->
onFocusReceived
();
new_focus_iter
++
;
}
// cache the new focus list for next time
swap
(
mCachedKeyboardFocusList
,
new_focus_list
);
mFocusTimer
.
reset
();
mFocusTimer
.
reset
();
#ifdef _DEBUG
#ifdef _DEBUG
...
...
This diff is collapsed.
Click to expand it.
indra/llui/llfocusmgr.h
+
4
−
0
View file @
936a1e36
...
@@ -102,6 +102,10 @@ class LLFocusMgr
...
@@ -102,6 +102,10 @@ class LLFocusMgr
LLUICtrl
*
mLastKeyboardFocus
;
// who last had focus
LLUICtrl
*
mLastKeyboardFocus
;
// who last had focus
LLUICtrl
*
mDefaultKeyboardFocus
;
LLUICtrl
*
mDefaultKeyboardFocus
;
BOOL
mKeystrokesOnly
;
BOOL
mKeystrokesOnly
;
// caching list of keyboard focus ancestors for calling onFocusReceived and onFocusLost
typedef
std
::
list
<
LLHandle
<
LLView
>
>
view_handle_list_t
;
view_handle_list_t
mCachedKeyboardFocusList
;
// Top View
// Top View
LLUICtrl
*
mTopCtrl
;
LLUICtrl
*
mTopCtrl
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment