diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index d4f95361..ca70f989 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -104,6 +104,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) connect(mKeyboardPalette, SIGNAL(keyboardActivated(bool)), mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); #ifdef Q_WS_X11 connect(mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask())); + connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask())); #endif } diff --git a/src/desktop/UBDesktopPalette.cpp b/src/desktop/UBDesktopPalette.cpp index ba88e3b4..d3641157 100644 --- a/src/desktop/UBDesktopPalette.cpp +++ b/src/desktop/UBDesktopPalette.cpp @@ -136,8 +136,11 @@ void UBDesktopPalette::minimizeMe(eMinimizedLocation location) actions << mMaximizeAction; setActions(actions); - QSize newSize = preferredSize(); - this->resize(newSize); + adjustSizeAndPosition(); + +#ifdef Q_WS_X11 + emit refreshMask(); +#endif } // Called when the user wants to maximize the palette @@ -161,11 +164,13 @@ void UBDesktopPalette::maximizeMe() setActions(actions); - QSize newSize = preferredSize(); - this->resize(newSize); + adjustSizeAndPosition(); // Notify that the maximization has been done emit maximized(); +#ifdef Q_WS_X11 + emit refreshMask(); +#endif } void UBDesktopPalette::showEvent(QShowEvent *event) diff --git a/src/desktop/UBDesktopPalette.h b/src/desktop/UBDesktopPalette.h index 83c01eab..cd22d43e 100644 --- a/src/desktop/UBDesktopPalette.h +++ b/src/desktop/UBDesktopPalette.h @@ -33,7 +33,10 @@ class UBDesktopPalette : public UBActionPalette void customClick(); void windowClick(); void screenClick(); -// void showVirtualKeyboard(bool); + +#ifdef Q_WS_X11 + void refreshMask(); +#endif public slots: