Fix DesktopGrid drag on X11
Summary: EffectsAPI explicitly says: "On X11, the window will end up on the last window in the list" and DesktopGrid reliaed on that. Using the last makes sense as it means the enterDesktop method will work for both. Somehow in the refactors AbstractClient ended up doing the opposite. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18339
This commit is contained in:
parent
c308565424
commit
e0071910f2
2 changed files with 6 additions and 1 deletions
|
@ -501,7 +501,7 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
|
|||
{
|
||||
//on x11 we can have only one desktop at a time
|
||||
if (kwinApp()->operationMode() == Application::OperationModeX11 && desktops.size() > 1) {
|
||||
desktops = QVector<VirtualDesktop*>({desktops.first()});
|
||||
desktops = QVector<VirtualDesktop*>({desktops.last()});
|
||||
}
|
||||
|
||||
if (desktops == m_desktops) {
|
||||
|
|
|
@ -430,6 +430,11 @@ public:
|
|||
void setDesktop(int);
|
||||
void enterDesktop(VirtualDesktop *desktop);
|
||||
void leaveDesktop(VirtualDesktop *desktop);
|
||||
|
||||
/**
|
||||
* Set the window as being on the attached list of desktops
|
||||
* On X11 it will be set to the last entry
|
||||
*/
|
||||
void setDesktops(QVector<VirtualDesktop *> desktops);
|
||||
|
||||
int desktop() const override {
|
||||
|
|
Loading…
Reference in a new issue