@@ -66,7 +66,7 @@ MainWindow::MainWindow(int screen, QWidget *parent) :
66
66
mainWindowsList = (MainWindow**)malloc (sizeof (MainWindow*) * QApplication::desktop ()->screenCount ());
67
67
mainWindowsList[m_Screen] = this ;
68
68
}
69
- setMainBackground ( true );
69
+
70
70
qApp->installEventFilter (this );
71
71
mirrored = 0 ;
72
72
currentScreen = m_Screen;
@@ -144,7 +144,7 @@ MainWindow::MainWindow(int screen, QWidget *parent) :
144
144
m_ClockForm->show ();
145
145
146
146
147
-
147
+ setMainBackground ( true );
148
148
149
149
// This hack ensures that the primary screen will have focus
150
150
// if there are more screens (move the mouse cursor in the center
@@ -335,11 +335,11 @@ void MainWindow::setMainBackground(bool start)
335
335
finalImage = resizeImage (rect, backgroundImage);
336
336
// screenImage = &backgroundImage;
337
337
338
- if (!formshidden && m_LoginForm != NULL ){
339
- QGraphicsOpacityEffect *blur = new QGraphicsOpacityEffect;
340
- blur ->setOpacity (0.5 );
338
+ if (( !formshidden) && m_LoginForm != NULL ){
339
+ QGraphicsOpacityEffect *opacitr = new QGraphicsOpacityEffect;
340
+ opacitr ->setOpacity (0.5 );
341
341
342
- QImage result = applyEffectToImage (finalImage, blur , 0 );
342
+ QImage result = applyEffectToImage (finalImage, opacitr , 0 );
343
343
344
344
QBrush brush (result);
345
345
palette.setBrush (this ->backgroundRole (), brush);
@@ -407,10 +407,10 @@ void MainWindow::setOtherBackgrounds(QImage *backgroundImage, bool start, bool f
407
407
tmp_image = resizeImage (rect, *backgroundImage);
408
408
409
409
if (!formshidden && m_LoginForm != NULL ){
410
- QGraphicsOpacityEffect *blur = new QGraphicsOpacityEffect;
411
- blur ->setOpacity (0.5 );
410
+ QGraphicsOpacityEffect *opacity = new QGraphicsOpacityEffect;
411
+ opacity ->setOpacity (0.5 );
412
412
413
- QImage result = applyEffectToImage (tmp_image, blur , 0 );
413
+ QImage result = applyEffectToImage (tmp_image, opacity , 0 );
414
414
415
415
QBrush brush (result);
416
416
palette.setBrush (this ->backgroundRole (), brush);
@@ -674,7 +674,6 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
674
674
675
675
676
676
void MainWindow::receiveKeyboardRequest (QPoint from, int width){
677
- showForms ();
678
677
679
678
if (checkTouchScreen ())
680
679
return ;
@@ -761,15 +760,15 @@ int MainWindow::checkTouchScreen(){
761
760
}
762
761
763
762
void MainWindow::receiveKeyboardClose (){
764
- showForms ();
763
+
765
764
screenKeyboard->close ();
766
765
767
766
emit keyboardClosed ();
768
767
769
768
}
770
769
771
770
void MainWindow::sendKeyPress (QString key){
772
- showForms ();
771
+
773
772
emit sendKeytoChilds (key);
774
773
775
774
}
@@ -844,6 +843,10 @@ void MainWindow::showForms(void){
844
843
return ;
845
844
}
846
845
846
+
847
+ if (!formshidden)
848
+ return ;
849
+
847
850
if (m_LoginForm){
848
851
m_LoginForm->showAll ();
849
852
// m_LoginForm->setFocus(Qt::OtherFocusReason);
@@ -944,7 +947,7 @@ void MainWindow::backgroundTimerCallback(void){
944
947
945
948
void MainWindow::keyPressEvent (QKeyEvent *event)
946
949
{
947
- showForms ();
950
+ // showForms();
948
951
QWidget::keyPressEvent (event);
949
952
}
950
953
void MainWindow::resetHideFormsTimer (void ){
0 commit comments