Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion indra/cmake/ViewerInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,15 @@ if(LINUX)
DESTINATION etc
COMPONENT viewer
)
install(DIRECTORY "${al_newview_dir}/res-sdl" DESTINATION . COMPONENT viewer)
# The window's cursors, and not the ll_icon.BMP older configures copied in
# beside them: the window's icon is the desktop entry's now, below.
install(
DIRECTORY "${al_newview_dir}/res-sdl"
DESTINATION .
COMPONENT viewer
FILES_MATCHING
PATTERN "*.png"
)

# The desktop entry, its AppStream data and its icons, laid out under share/
# as they go under /usr/share. The entry runs the launcher by the package
Expand Down
7 changes: 4 additions & 3 deletions indra/llui/code/alkeychord.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@

class LLView;

// A key as the studio's keymaps name it. SDL's windows -- the Mac's and
// Linux's -- say KEY_DIVIDE for the slash key, which is the keypad's
// slash on Windows, so a key bound as '/' is heard from either.
// A key as the studio's keymaps name it. The keypad's slash is KEY_DIVIDE,
// and was the slash key's too on SDL's windows -- the Mac's and Linux's --
// before they gave it '/', as Windows does; so a key bound as '/' is heard
// from either, and a binding kept as KEY_DIVIDE reads as '/'.
inline KEY alKeyAsBound(KEY key)
{
return key == KEY_DIVIDE ? KEY('/') : key;
Expand Down
2 changes: 1 addition & 1 deletion indra/llui/tests/alkeymap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace tut
template<> template<>
void alkeymap_object::test<5>()
{
set_test_name("the slash key is heard as the SDL windows name it: KEY_DIVIDE comments as '/' does, and binds as '/'");
set_test_name("the keypad's slash is heard as the slash key: KEY_DIVIDE comments as '/' does, and binds as '/'");
ALKeymap map = ALKeymap::standard();
ensure("Control with the slash key as '/'", map.lookup('/', MASK_CONTROL) == C::ToggleComment);
ensure("and as KEY_DIVIDE", map.lookup(KEY_DIVIDE, MASK_CONTROL) == C::ToggleComment);
Expand Down
32 changes: 27 additions & 5 deletions indra/llui/text/altextview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4395,12 +4395,20 @@ bool ALTextView::getPreeditLocation(S32 query_offset, LLCoordGL* coord, LLRect*
}
if (bounds)
{
S32 row_begin, row_end;
const F32 x0 = lay().xOf(begin.line, begin.column, &row_begin);
F32 x1 = lay().xOf(begin.line, begin.column + mPreeditLength, &row_end);
if (row_end != row_begin)
// The preedit's span on the query's row, which is the row the top
// is of: from the row's start where the preedit began on a row
// before, to its end where it goes on to a row after.
S32 row_begin, row_end, row_at;
F32 x0 = lay().xOf(begin.line, begin.column, &row_begin);
F32 x1 = lay().xOf(begin.line, begin.column + mPreeditLength, &row_end);
lay().xOf(query.line, query.column, &row_at);
if (row_begin != row_at)
{
x1 = lay().line(begin.line).rows[row_begin].width;
x0 = 0.f;
}
if (row_end != row_at)
{
x1 = lay().line(begin.line).rows[row_at].width;
}
LLRect local(static_cast<S32>(left + x0), top, static_cast<S32>(left + x1), top - row_h);
LLRect screen;
Expand Down Expand Up @@ -5653,6 +5661,20 @@ void ALTextView::draw()
LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, text.getWidth(), nullptr, true);
}
}
// The input method's window at the caret, kept there as the caret, the
// scroll and the view move, as a text field keeps it from where it draws
// its caret: the caret's x, at the top of its row. Not while the caret
// is out of sight, where the window has nowhere to put it.
if (mLanguageInput && gFocusMgr.getAppHasFocus())
{
LLCoordGL caret;
LLRect row;
LLWindow* window = getWindow();
if (window && getPreeditLocation(-1, &caret, &row, nullptr))
{
window->setLanguageTextInput(LLCoordGL(caret.mX, row.mTop));
}
}
drawBars(alpha);
if (mModal)
{
Expand Down
6 changes: 5 additions & 1 deletion indra/llwindow/llkeyboardsdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ LLKeyboardSDL::LLKeyboardSDL()
mTranslateKeyMap[SDLK_MINUS] = '-';
mTranslateKeyMap[SDLK_PERIOD] = '.';
mTranslateKeyMap[SDLK_GRAVE] = '`';
mTranslateKeyMap[SDLK_SLASH] = KEY_DIVIDE;
// The main-row slash is '/', as Win32 maps VK_OEM_2: LL moved it off the
// keypad's code there because that broke typing into media prims
// (EXT-3650), and as KEY_DIVIDE it also fired the start_gesture binding
// the keypad's slash has. Only the keypad's slash is KEY_DIVIDE, above.
mTranslateKeyMap[SDLK_SLASH] = '/';
mTranslateKeyMap[SDLK_SEMICOLON] = ';';
mTranslateKeyMap[SDLK_LEFTBRACKET] = '[';
mTranslateKeyMap[SDLK_BACKSLASH] = '\\';
Expand Down
Loading
Loading