Merge branch 'Plasma/5.4'
This commit is contained in:
commit
1ab663436d
8 changed files with 31 additions and 7 deletions
|
@ -1711,6 +1711,8 @@ void Client::getMotifHints()
|
|||
{
|
||||
const bool wasClosable = m_motif.close();
|
||||
const bool wasNoBorder = m_motif.noBorder();
|
||||
if (m_managed) // only on property change, initial read is prefetched
|
||||
m_motif.fetch();
|
||||
m_motif.read();
|
||||
if (m_motif.hasDecoration() && m_motif.noBorder() != wasNoBorder) {
|
||||
// If we just got a hint telling us to hide decorations, we do so.
|
||||
|
|
|
@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <netwm_def.h>
|
||||
#include <QEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QTimer>
|
||||
#include <QtGui/QVector2D>
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
|
@ -1052,6 +1053,15 @@ void DesktopGridEffect::setActive(bool active)
|
|||
}
|
||||
}
|
||||
}
|
||||
QTimer::singleShot(zoomDuration + 1, this,
|
||||
[this] {
|
||||
if (activated)
|
||||
return;
|
||||
foreach (DesktopButtonsView *view, m_desktopButtonsViews.keys()) {
|
||||
view->hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
setHighlightedDesktop(effects->currentDesktop()); // Ensure selected desktop is highlighted
|
||||
}
|
||||
effects->addRepaintFull();
|
||||
|
@ -1098,6 +1108,7 @@ void DesktopGridEffect::setup()
|
|||
if (m_usePresentWindows)
|
||||
m_proxy = static_cast<PresentWindowsEffectProxy*>(effects->getProxy(BuiltInEffects::nameForEffect(BuiltInEffect::PresentWindows)));
|
||||
if (isUsingPresentWindows()) {
|
||||
m_proxy->reCreateGrids(); // revalidation on multiscreen, bug #351724
|
||||
for (int i = 1; i <= effects->numberOfDesktops(); i++) {
|
||||
for (int j = 0; j < effects->numScreens(); j++) {
|
||||
WindowMotionManager manager;
|
||||
|
|
|
@ -96,7 +96,12 @@ PresentWindowsEffect::PresentWindowsEffect()
|
|||
connect(effects, SIGNAL(windowDeleted(KWin::EffectWindow*)), this, SLOT(slotWindowDeleted(KWin::EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowGeometryShapeChanged(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowGeometryShapeChanged(KWin::EffectWindow*,QRect)));
|
||||
connect(effects, SIGNAL(propertyNotify(KWin::EffectWindow*,long)), this, SLOT(slotPropertyNotify(KWin::EffectWindow*,long)));
|
||||
connect(effects, &EffectsHandler::numberScreensChanged, this, &PresentWindowsEffect::screenCountChanged);
|
||||
connect(effects, &EffectsHandler::numberScreensChanged, this,
|
||||
[this] {
|
||||
if (isActive())
|
||||
reCreateGrids();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
PresentWindowsEffect::~PresentWindowsEffect()
|
||||
|
@ -1489,7 +1494,7 @@ void PresentWindowsEffect::setActive(bool active)
|
|||
m_hasKeyboardGrab = effects->grabKeyboard(this);
|
||||
effects->setActiveFullScreenEffect(this);
|
||||
|
||||
screenCountChanged();
|
||||
reCreateGrids();
|
||||
|
||||
rearrangeWindows();
|
||||
setHighlightedWindow(effects->activeWindow());
|
||||
|
@ -1866,10 +1871,8 @@ bool PresentWindowsEffect::isActive() const
|
|||
return m_activated || m_motionManager.managingWindows();
|
||||
}
|
||||
|
||||
void PresentWindowsEffect::screenCountChanged()
|
||||
void PresentWindowsEffect::reCreateGrids()
|
||||
{
|
||||
if (!isActive())
|
||||
return;
|
||||
m_gridSizes.clear();
|
||||
for (int i = 0; i < effects->numScreens(); ++i) {
|
||||
m_gridSizes.append(GridSize());
|
||||
|
|
|
@ -225,11 +225,11 @@ public Q_SLOTS:
|
|||
private Q_SLOTS:
|
||||
void closeWindow();
|
||||
void elevateCloseWindow();
|
||||
void screenCountChanged();
|
||||
|
||||
protected:
|
||||
// Window rearranging
|
||||
void rearrangeWindows();
|
||||
void reCreateGrids();
|
||||
void calculateWindowTransformations(EffectWindowList windowlist, int screen,
|
||||
WindowMotionManager& motionManager, bool external = false);
|
||||
void calculateWindowTransformationsClosest(EffectWindowList windowlist, int screen,
|
||||
|
|
|
@ -39,4 +39,9 @@ void PresentWindowsEffectProxy::calculateWindowTransformations(EffectWindowList
|
|||
return m_effect->calculateWindowTransformations(windows, screen, manager, true);
|
||||
}
|
||||
|
||||
void PresentWindowsEffectProxy::reCreateGrids()
|
||||
{
|
||||
m_effect->reCreateGrids();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -35,6 +35,8 @@ public:
|
|||
|
||||
void calculateWindowTransformations(EffectWindowList windows, int screen, WindowMotionManager& manager);
|
||||
|
||||
void reCreateGrids();
|
||||
|
||||
private:
|
||||
PresentWindowsEffect* m_effect;
|
||||
};
|
||||
|
|
|
@ -907,7 +907,6 @@ void Client::propertyNotifyEvent(xcb_property_notify_event_t *e)
|
|||
break;
|
||||
default:
|
||||
if (e->atom == atoms->motif_wm_hints) {
|
||||
m_motif.fetch();
|
||||
getMotifHints();
|
||||
} else if (e->atom == atoms->net_wm_sync_request_counter)
|
||||
getSyncCounter();
|
||||
|
|
|
@ -672,6 +672,7 @@ void Client::cleanGrouping()
|
|||
// it != group_members.end();
|
||||
// ++it )
|
||||
// qDebug() << "CL4:" << *it;
|
||||
m_transientForId = XCB_WINDOW_NONE;
|
||||
}
|
||||
|
||||
// Make sure that no group transient is considered transient
|
||||
|
@ -886,6 +887,7 @@ ClientList Client::mainClients() const
|
|||
if (transientFor() != NULL)
|
||||
return ClientList() << const_cast< Client* >(transientFor());
|
||||
ClientList result;
|
||||
Q_ASSERT(group());
|
||||
for (ClientList::ConstIterator it = group()->members().constBegin();
|
||||
it != group()->members().constEnd();
|
||||
++it)
|
||||
|
|
Loading…
Reference in a new issue