diff --git a/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage 2.pictClipping b/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage 2.pictClipping deleted file mode 100644 index e69de29b..00000000 diff --git a/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage.pictClipping b/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage.pictClipping deleted file mode 100644 index e69de29b..00000000 diff --git a/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage 2.pictClipping b/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage 2.pictClipping deleted file mode 100644 index e69de29b..00000000 diff --git a/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage.pictClipping b/resources/library/interactive/Stopwatch.wgt/images/Extrait dÔÇÖimage.pictClipping deleted file mode 100644 index e69de29b..00000000 diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index e3abfc04..460fdb0c 100755 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -168,6 +168,9 @@ void UBBoardPaletteManager::setupPalettes() if (UBPlatformUtils::hasVirtualKeyboard()) { mKeyboardPalette = UBKeyboardPalette::create(0); +#ifndef Q_WS_WIN + connect(mKeyboardPalette, SIGNAL(closed()), mKeyboardPalette, SLOT(onDeactivated())); +#endif #ifndef Q_WS_MAC mKeyboardPalette->setParent(mContainer); #endif diff --git a/src/gui/UBKeyboardPalette.h b/src/gui/UBKeyboardPalette.h index f23f52b6..68a0a7e9 100644 --- a/src/gui/UBKeyboardPalette.h +++ b/src/gui/UBKeyboardPalette.h @@ -92,6 +92,7 @@ private slots: void syncLocale(int nLocale); void keyboardPaletteButtonSizeChanged(QVariant size); void onActivated(bool b); + void onDeactivated(); void showKeyboard(bool show); void hideKeyboard(); diff --git a/src/gui/UBKeyboardPalette_linux.cpp b/src/gui/UBKeyboardPalette_linux.cpp index 7b52fd0d..34200895 100644 --- a/src/gui/UBKeyboardPalette_linux.cpp +++ b/src/gui/UBKeyboardPalette_linux.cpp @@ -154,15 +154,28 @@ void UBKeyboardPalette::onActivated(bool activated) XChangeKeyboardMapping(display, min_keycodes, byte_per_code, keySyms, max_keycodes - min_keycodes); - XFree(keySyms); - } + XFree(keySyms); + } 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, const UBKeyboardLocale& locale, diff --git a/src/gui/UBKeyboardPalette_mac.cpp b/src/gui/UBKeyboardPalette_mac.cpp index a9814495..e4e2088e 100644 --- a/src/gui/UBKeyboardPalette_mac.cpp +++ b/src/gui/UBKeyboardPalette_mac.cpp @@ -102,7 +102,10 @@ void UBKeyboardPalette::onActivated(bool activated) SetMacLocaleByIdentifier(activeLocale); } } - +void UBKeyboardPalette::onDeactivated() +{ + SetMacLocaleByIdentifier(activeLocale); +} void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* locale) { SetMacLocaleByIdentifier(locale->id); diff --git a/src/gui/UBKeyboardPalette_win.cpp b/src/gui/UBKeyboardPalette_win.cpp index 5f9da4f7..9e613a89 100644 --- a/src/gui/UBKeyboardPalette_win.cpp +++ b/src/gui/UBKeyboardPalette_win.cpp @@ -70,7 +70,10 @@ void UBKeyboardPalette::createCtrlButtons() void UBKeyboardPalette::onActivated(bool) { } +void UBKeyboardPalette::onDeactivated() +{ +} void UBKeyboardPalette::onLocaleChanged(UBKeyboardLocale* ) {} diff --git a/src/web/UBWebController.cpp b/src/web/UBWebController.cpp index 3485f169..3dbd6aed 100644 --- a/src/web/UBWebController.cpp +++ b/src/web/UBWebController.cpp @@ -370,6 +370,10 @@ void UBWebController::setupPalettes() (*mToolsCurrentPalette) = new UBWebToolsPalette((*mCurrentWebBrowser),false); (*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->actionWebCustomCapture, SIGNAL(triggered()), this, SLOT(customCapture()));