Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Pager is not updated when a window moved to another desktop #99

Open
ilkerhk opened this issue Apr 5, 2018 · 3 comments
Open

Pager is not updated when a window moved to another desktop #99

ilkerhk opened this issue Apr 5, 2018 · 3 comments

Comments

@ilkerhk
Copy link

ilkerhk commented Apr 5, 2018

This is really a minor issue that doesn't affect the functionality at all. It is a cosmetic issue but maybe its fix is also something simple.

I am using pager to see window layouts. When a window is moved to a virtual desktop (other than the current one) the window size/locations are not updated in the pager. See the images to see what I mean. The first image shows initial layout. Then when I moved konsole into second desktop. In the second image, you can see the layout in pager not updated in desktop 2 and 3.

img1

img2

@ilkerhk ilkerhk changed the title Pager doesn't update when window send to another virtual desktop Pager is not updated when a window moved to another desktop Apr 5, 2018
@faho
Copy link
Collaborator

faho commented Apr 7, 2018

It is a cosmetic issue but maybe its fix is also something simple.

It's probably not. It would require us to do the tiling computations earlier (currently we only do them once you switch to that desktop), and I think that'd require a bit of refactoring in the code.

I'm not gonna do that, but if anyone else wants to try, feel free!

@ilkerhk
Copy link
Author

ilkerhk commented Dec 13, 2018

I am writing this comment to ask for an idea for a workaround.

This same issue happens when I connect my laptop to an external monitor if it has different resolution. This time on all desktop layouts mess up.

As a workaround, on monitor connect I am running a script which first restarts plasma and then visits each desktop in a loop using "wmctrl -s"Going to that desktop also fixes pager but this is really poor mans way. Does anyone know a better solution?

What I want to do is to repaint (or refresh) a virtual desktop and pager without actually visiting the desktop. (So I want to stay in desktop #1 but repaint others). I tried xrefresh, xrandr etc. but couldn't find anything. I am guessing there must be a way to this specific to KDE maybe?

thanks.

@ilkerhk
Copy link
Author

ilkerhk commented Jan 16, 2019

Here is a few lines of change (in tilingmanager.js and tilelist.js) that I am using for the last week or so for the above issues. It is probably not ideal/good way to fix but, I tested for a while and it seems to be working for me after below changes. (Sorry I don't know how to do a patch proposal so I am writing this note.)

EDIT: I realized below is a less ugly way.

In tilelist.js, in Tile.prototype.setClientGeometry, remove below if statement

if (this._currentDesktop != workspace.currentDesktop
             && this._currentDesktop != -1)
   {return;} 

In Tile.prototype.onClientDesktopChanged, after line "this.desktopChanged.emit(oldDesktop, this._currentDesktop);" add

var tmp = workspace.currentDesktop;
if (workspace.currentDesktop != oldDesktop) {workspace.currentDesktop = oldDesktop;}
if (workspace.currentDesktop != this._currentDesktop) {workspace.currentDesktop = this._currentDesktop;}
if (workspace.currentDesktop != tmp) {workspace.currentDesktop = tmp }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants