virtual keyboard bug fixed. Linux tested

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent 9c1928d77d
commit 46e4d4092c
  1. 0
      resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage 2.pictClipping
  2. 0
      resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage.pictClipping
  3. 0
      resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage 2.pictClipping
  4. 0
      resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage.pictClipping
  5. 3
      src/board/UBBoardPaletteManager.cpp
  6. 1
      src/gui/UBKeyboardPalette.h
  7. 15
      src/gui/UBKeyboardPalette_linux.cpp
  8. 5
      src/gui/UBKeyboardPalette_mac.cpp
  9. 3
      src/gui/UBKeyboardPalette_win.cpp
  10. 4
      src/web/UBWebController.cpp

@ -168,6 +168,9 @@ void UBBoardPaletteManager::setupPalettes()
if (UBPlatformUtils::hasVirtualKeyboard()) if (UBPlatformUtils::hasVirtualKeyboard())
{ {
mKeyboardPalette = UBKeyboardPalette::create(0); mKeyboardPalette = UBKeyboardPalette::create(0);
#ifndef Q_WS_WIN
connect(mKeyboardPalette, SIGNAL(closed()), mKeyboardPalette, SLOT(onDeactivated()));
#endif
#ifndef Q_WS_MAC #ifndef Q_WS_MAC
mKeyboardPalette->setParent(mContainer); mKeyboardPalette->setParent(mContainer);
#endif #endif

@ -92,6 +92,7 @@ private slots:
void syncLocale(int nLocale); void syncLocale(int nLocale);
void keyboardPaletteButtonSizeChanged(QVariant size); void keyboardPaletteButtonSizeChanged(QVariant size);
void onActivated(bool b); void onActivated(bool b);
void onDeactivated();
void showKeyboard(bool show); void showKeyboard(bool show);
void hideKeyboard(); void hideKeyboard();

@ -154,15 +154,28 @@ void UBKeyboardPalette::onActivated(bool activated)
XChangeKeyboardMapping(display, min_keycodes, byte_per_code, XChangeKeyboardMapping(display, min_keycodes, byte_per_code,
keySyms, max_keycodes - min_keycodes); keySyms, max_keycodes - min_keycodes);
XFree(keySyms); XFree(keySyms);
} }
XCloseDisplay(display); XCloseDisplay(display);
} }
} }
void UBKeyboardPalette::onDeactivated()
{
Display *display = XOpenDisplay(0);
if(display == NULL)
return;
KeySym* keySyms = (KeySym*)storage;
if (keySyms!=NULL) {
XChangeKeyboardMapping(display, min_keycodes, byte_per_code,
keySyms, max_keycodes - min_keycodes);
}
XCloseDisplay(display);
}
void setSymbolsFromButton(Display *display, void setSymbolsFromButton(Display *display,
const UBKeyboardLocale& locale, const UBKeyboardLocale& locale,

@ -102,7 +102,10 @@ void UBKeyboardPalette::onActivated(bool activated)
SetMacLocaleByIdentifier(activeLocale); SetMacLocaleByIdentifier(activeLocale);
} }
} }
void UBKeyboardPalette::onDeactivated()
{
SetMacLocaleByIdentifier(activeLocale);
}
void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* locale) void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* locale)
{ {
SetMacLocaleByIdentifier(locale->id); SetMacLocaleByIdentifier(locale->id);

@ -70,7 +70,10 @@ void UBKeyboardPalette::createCtrlButtons()
void UBKeyboardPalette::onActivated(bool) void UBKeyboardPalette::onActivated(bool)
{ {
} }
void UBKeyboardPalette::onDeactivated()
{
}
void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* ) void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* )
{} {}

@ -370,6 +370,10 @@ void UBWebController::setupPalettes()
(*mToolsCurrentPalette) = new UBWebToolsPalette((*mCurrentWebBrowser),false); (*mToolsCurrentPalette) = new UBWebToolsPalette((*mCurrentWebBrowser),false);
(*mKeyboardCurrentPalette) = UBKeyboardPalette::create(*mCurrentWebBrowser); (*mKeyboardCurrentPalette) = UBKeyboardPalette::create(*mCurrentWebBrowser);
#ifndef Q_WS_WIN
if (*mKeyboardCurrentPalette)
connect(*mKeyboardCurrentPalette, SIGNAL(closed()), *mKeyboardCurrentPalette, SLOT(onDeactivated()));
#endif
connect(mMainWindow->actionWebTrapFlash, SIGNAL(triggered()), this, SLOT(trapFlash())); connect(mMainWindow->actionWebTrapFlash, SIGNAL(triggered()), this, SLOT(trapFlash()));
connect(mMainWindow->actionWebCustomCapture, SIGNAL(triggered()), this, SLOT(customCapture())); connect(mMainWindow->actionWebCustomCapture, SIGNAL(triggered()), this, SLOT(customCapture()));

Loading…
Cancel
Save