fix #116, remove QueuedConnection

pull/1/head
Michail Vourlakos 8 years ago
parent f22a203d12
commit 827bde86d4

@ -224,6 +224,9 @@ QRect DockCorona::availableScreenRect(int id) const
int DockCorona::primaryScreenId() const int DockCorona::primaryScreenId() const
{ {
//this is not the proper way because kwin probably uses a different
//index of screens...
//This needs a lot of testing...
return qGuiApp->screens().indexOf(qGuiApp->primaryScreen()); return qGuiApp->screens().indexOf(qGuiApp->primaryScreen());
} }

@ -109,7 +109,7 @@ DockView::~DockView()
void DockView::init() void DockView::init()
{ {
connect(this, &DockView::screenChanged, this, &DockView::adaptToScreen, Qt::QueuedConnection); connect(this, &DockView::screenChanged, this, &DockView::adaptToScreen);
connect(this, &DockView::screenGeometryChanged, this, &DockView::syncGeometry); connect(this, &DockView::screenGeometryChanged, this, &DockView::syncGeometry);
connect(this, &QQuickWindow::widthChanged, this, &DockView::widthChanged); connect(this, &QQuickWindow::widthChanged, this, &DockView::widthChanged);
connect(this, &QQuickWindow::heightChanged, this, &DockView::heightChanged); connect(this, &QQuickWindow::heightChanged, this, &DockView::heightChanged);
@ -135,7 +135,7 @@ void DockView::init()
void DockView::adaptToScreen(QScreen *screen) void DockView::adaptToScreen(QScreen *screen)
{ {
if (!screen || !this->containment() || this->screen() == screen) { if (!screen) {
return; return;
} }
@ -249,7 +249,7 @@ void DockView::resizeWindow()
setMaximumSize(size); setMaximumSize(size);
resize(size); resize(size);
} else { } else {
QSize screenSize = screen()->size(); QSize screenSize = this->screen()->size();
QSize size{screenSize.width(), maxThickness()}; QSize size{screenSize.width(), maxThickness()};
if (m_drawShadows) { if (m_drawShadows) {
@ -298,7 +298,7 @@ void DockView::updatePosition()
switch (location()) { switch (location()) {
case Plasma::Types::TopEdge: case Plasma::Types::TopEdge:
screenGeometry = screen()->geometry(); screenGeometry = this->screen()->geometry();
if (m_drawShadows) { if (m_drawShadows) {
position = {screenGeometry.x() + length(screenGeometry.width()), screenGeometry.y()}; position = {screenGeometry.x() + length(screenGeometry.width()), screenGeometry.y()};
@ -309,7 +309,7 @@ void DockView::updatePosition()
break; break;
case Plasma::Types::BottomEdge: case Plasma::Types::BottomEdge:
screenGeometry = screen()->geometry(); screenGeometry = this->screen()->geometry();
if (m_drawShadows) { if (m_drawShadows) {
position = {screenGeometry.x() + length(screenGeometry.width()), position = {screenGeometry.x() + length(screenGeometry.width()),
@ -355,7 +355,7 @@ void DockView::updatePosition()
inline void DockView::syncGeometry() inline void DockView::syncGeometry()
{ {
if (!(screen() && this->containment())) if (!(this->screen() && this->containment()))
return; return;
updateEnabledBorders(); updateEnabledBorders();

Loading…
Cancel
Save