Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
6eea1d83
Commit
6eea1d83
authored
Oct 10, 2022
by
Laurent Montel
Browse files
Port away QDesktopWidget
parent
6454dfd3
Pipeline
#245034
canceled with stage
in 2 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/src/recipient/kwindowpositioner.cpp
View file @
6eea1d83
...
...
@@ -9,9 +9,7 @@
#include
"kwindowpositioner.h"
#include
"messagecomposer_debug.h"
#include
<QApplication>
#include
<QDesktopWidget>
#include
<QScreen>
using
namespace
MessageComposer
;
KWindowPositioner
::
KWindowPositioner
(
QWidget
*
master
,
QWidget
*
slave
,
Mode
mode
)
...
...
@@ -35,7 +33,7 @@ void KWindowPositioner::reposition()
QPoint
pos
=
mMaster
->
mapToGlobal
(
relativePos
);
// fix position to avoid hiding parts of the window (needed especially when not using KWin)
const
QRect
desktopRect
(
qApp
->
desktop
()
->
availableGeometry
(
mMaster
));
const
QRect
desktopRect
(
mMaster
->
screen
()
->
availableGeometry
());
if
((
pos
.
x
()
+
mSlave
->
frameGeometry
().
width
())
>
desktopRect
.
width
())
{
pos
.
setX
(
desktopRect
.
width
()
-
mSlave
->
frameGeometry
().
width
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment