fixed issue of windows on double screen

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent ea9217ad0e
commit 715eb229c3
  1. 2
      src/board/UBBoardPaletteManager.cpp
  2. 38
      src/core/UBApplication.cpp
  3. 2
      src/core/UBDisplayManager.cpp
  4. 32
      src/desktop/UBDesktopAnnotationController.cpp
  5. 1
      src/web/UBWebController.cpp
  6. 1
      src/web/UBWebController.h

@ -775,7 +775,7 @@ void UBBoardPaletteManager::addItem(const QPixmap& pPixmap, const QPointF& pos,
mPos = pos; mPos = pos;
mScaleFactor = scaleFactor; mScaleFactor = scaleFactor;
QRect controlGeo = UBApplication::applicationController->displayManager()->controlGeometry(); QRect controlGeo = UBApplication::applicationController->displayManager()->controlGeometry();
mAddItemPalette->show(); mAddItemPalette->show();
mAddItemPalette->adjustSizeAndPosition(); mAddItemPalette->adjustSizeAndPosition();

@ -325,31 +325,31 @@ int UBApplication::exec(const QString& pFileToImport)
applicationController->showBoard(); applicationController->showBoard();
if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool()) // if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool())
{ // {
UBSettings::settings()->appIsInSoftwareUpdateProcess->set(false); // UBSettings::settings()->appIsInSoftwareUpdateProcess->set(false);
// clean potential updater in temp directory // // clean potential updater in temp directory
UBFileSystemUtils::cleanupGhostTempFolders(); // UBFileSystemUtils::cleanupGhostTempFolders();
QUuid docUuid( UBSettings::settings()->appLastSessionDocumentUUID->get().toString()); // QUuid docUuid( UBSettings::settings()->appLastSessionDocumentUUID->get().toString());
if (!docUuid.isNull()) // if (!docUuid.isNull())
{ // {
UBDocumentProxy* proxy = UBPersistenceManager::persistenceManager()->documentByUuid(docUuid); // UBDocumentProxy* proxy = UBPersistenceManager::persistenceManager()->documentByUuid(docUuid);
if (proxy) // if (proxy)
{ // {
bool ok; // bool ok;
int lastSceneIndex = UBSettings::settings()->appLastSessionPageIndex->get().toInt(&ok); // int lastSceneIndex = UBSettings::settings()->appLastSessionPageIndex->get().toInt(&ok);
if (!ok) // if (!ok)
lastSceneIndex = 0; // lastSceneIndex = 0;
boardController->setActiveDocumentScene(proxy, lastSceneIndex); // boardController->setActiveDocumentScene(proxy, lastSceneIndex);
} // }
} // }
} // }

@ -147,6 +147,8 @@ void UBDisplayManager::setDisplayWidget(QWidget* pDisplayWidget)
if(pDisplayWidget && (pDisplayWidget != mDisplayWidget)) if(pDisplayWidget && (pDisplayWidget != mDisplayWidget))
{ {
mDisplayWidget = pDisplayWidget; mDisplayWidget = pDisplayWidget;
mDisplayWidget->setGeometry(mDesktop->screenGeometry(mDisplayScreenIndex));
mDisplayWidget->showFullScreen();
// !!!! Should be included into Windows after QT recompilation // !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
// mDisplayWidget->setAttribute(Qt::WA_MacNoShadow); // mDisplayWidget->setAttribute(Qt::WA_MacNoShadow);

@ -69,7 +69,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mTransparentDrawingView = new UBBoardView(UBApplication::boardController, 0); // deleted in UBDesktopAnnotationController::destructor mTransparentDrawingView = new UBBoardView(UBApplication::boardController, 0); // deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
// !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
#endif #endif
@ -111,8 +110,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized())); connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized()));
connect(UBDrawingController::drawingController(), SIGNAL(stylusToolChanged(int)) connect(UBDrawingController::drawingController(), SIGNAL(stylusToolChanged(int)), this, SLOT(stylusToolChanged(int)));
, this, SLOT(stylusToolChanged(int)));
// Add the desktop associated palettes // Add the desktop associated palettes
mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView); mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView);
@ -147,39 +145,11 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
#ifdef Q_WS_X11 #ifdef Q_WS_X11
connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask())); connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask()));
// connect(mRightPalette, SIGNAL(resized()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask()));
#endif #endif
onDesktopPaletteMaximized(); onDesktopPaletteMaximized();
} }
// void UBDesktopAnnotationController::showKeyboard(bool show)
// {
// #ifdef Q_WS_X11
// if (!mTransparentDrawingView->isVisible())
// return;
// #endif
//
// if(mKeyboardPalette)
// {
// if(show)
// UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
// mKeyboardPalette->setVisible(show);
//
// #ifdef Q_WS_X11
// updateMask(true);
// #endif
//
// }
//
// }
// void UBDesktopAnnotationController::showKeyboard()
// {
// if (UBApplication::mainWindow->actionVirtualKeyboard->isChecked())
// mKeyboardPalette->show();
// }
UBDesktopAnnotationController::~UBDesktopAnnotationController() UBDesktopAnnotationController::~UBDesktopAnnotationController()
{ {
delete mTransparentDrawingScene; delete mTransparentDrawingScene;

@ -32,7 +32,6 @@
#include "network/UBNetworkAccessManager.h" #include "network/UBNetworkAccessManager.h"
#include "gui/UBWidgetMirror.h" #include "gui/UBWidgetMirror.h"
#include "gui/UBScreenMirror.h"
#include "gui/UBMainWindow.h" #include "gui/UBMainWindow.h"
#include "gui/UBWebToolsPalette.h" #include "gui/UBWebToolsPalette.h"
#include "gui/UBKeyboardPalette.h" #include "gui/UBKeyboardPalette.h"

@ -23,7 +23,6 @@
class WBBrowserWindow; class WBBrowserWindow;
class UBApplication; class UBApplication;
class UBScreenMirror;
class UBTrapFlashController; class UBTrapFlashController;
class UBMainWindow; class UBMainWindow;
class UBWebToolsPalette; class UBWebToolsPalette;

Loading…
Cancel
Save