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

kwin-tiling locks up clients (timing issue) #6

Closed
Keks-Dose opened this issue Dec 10, 2013 · 14 comments
Closed

kwin-tiling locks up clients (timing issue) #6

Keks-Dose opened this issue Dec 10, 2013 · 14 comments
Labels

Comments

@Keks-Dose
Copy link

openSuse 13.1, GNU Emacs 24.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.10.2) of 2013-12-03 on build22, KDE 4.11.3, Kernel 3.12.3

Installed kwin-tiling, activated and tried to have Emacs on one side and okular on the other side of the screen. But Emacs kind of freezes after every command. I can unlock it by klicking on the icon for changing the window size, but you can't work this way, of course.

So maybe you, Fabian, you can have a look into this. At the first moment I was really surprised to see your approach, but probably you are right to use just a script.

Probably most people just wish to have two windows side by side, everything else won't be used much.

@faho
Copy link
Collaborator

faho commented Dec 10, 2013

Try current git master, this is probably exactly what b147570 and aa54343 were about.

(I'm thinking about making a release, but I want to test this some more first)

@Keks-Dose
Copy link
Author

Yes, Emacs no longer is locked, but it does not work properly, at least I don't comprehend, what's going on. I switch on / off with Meta+Ctrl+F11? I'm using openSuse and usually have four desktops (»Arbeitsflächen«). Does switching it on work for all desktops, or only for one? However, I really like your approach. If you release, please document a bit more. I had to search for a while to find out that I can't update kwinscripts easily by using the GUI. I had to delete the old kwinscript inside ~/.kde4/share/apps/kwin/scripts, before I could install the new version.

How do I change the layout, I read, there were three of them?

@faho
Copy link
Collaborator

faho commented Dec 11, 2013

To be clear: Emacs is now responsive?

M-C-F11 turns tiling off for the current desktop (default is on when the script is enabled, though I'm open to making it configurable).

You can switch layouts with M-PgUp / M-PgDn (Bild-Hoch bzw Bild-Runter).

You can update kwinscripts through the GUI, just go to "download script" again and if there's a new release you should be offered an upgrade. However this wasn't a new release on kde-look.org.

@Keks-Dose
Copy link
Author

Yes, Emacs is responsive.

Aha, M-C-F11 only turns it off, but then not on again. Well, on / off surely would be better.

I will test later, just now I'm in a hurry -- thank you for your fast reaction!

@faho
Copy link
Collaborator

faho commented Dec 11, 2013

It's supposed to turn it on again, and does so on my system.

Anyway that's a different issue, so I'll close this one and you can open another for M-C-F11.

EDIT: It's M-S-F11 (with "M" here being the windows key)

@rrix
Copy link

rrix commented Sep 24, 2014

I'm seeing this behavior with master script on kde 4.13.3 and emacs 24.3.1 :/

@taojang
Copy link

taojang commented Nov 20, 2014

so do I, the only workaround is to use fullscreen (F11) for emacs
of course disabling tiling works

@faho
Copy link
Collaborator

faho commented Nov 21, 2014

Ah crap... Let's reopen this thing, report it upstream (it's an issue with more than just emacs - I can reproduce it reliably with firefox) and get it fixed.

@faho faho reopened this Nov 21, 2014
@faho
Copy link
Collaborator

faho commented Nov 23, 2014

This is now reported upstream at https://bugs.kde.org/show_bug.cgi?id=341195.

Let's see what they say.

@faho faho added the upstream label Nov 23, 2014
@faho faho changed the title kwin-tiling locks up Emacs kwin-tiling locks up clients (timing issue) Jan 29, 2015
@faho faho mentioned this issue Jan 29, 2015
@faho
Copy link
Collaborator

faho commented Feb 5, 2015

As for emacs, I found a workaround:

Set frame-resize-pixelwise to non-nil, like so:

(if (display-graphic-p)
    (progn
      (setq frame-resize-pixelwise t)))

faho added a commit that referenced this issue Mar 14, 2015
There are four modes of failure here:

- basicUnit

unlike what KWin Api
doc (https://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9)
says, clients may show issues if this is not honored.

- Violating min/maxSize

This can be fixed by just not doing that.

- Timing issues regarding desktop switching

- Timing issues on application startup

The latter two can be fixed by simply writing the geometry _again_,
the former requires some calculation.

Emacs (24.4 with gtk3) seems to be fine with how we do these, gvim (7.4.617) is
almost but requires a resize.

Steam also behaves better, as do firefox and vlc.

This also means we can drop the windowShown HACK, which means it:

Fixes #24

Partially fixes #6
@faho faho mentioned this issue Oct 26, 2016
faho added a commit that referenced this issue Nov 5, 2016
This was completely ineffectual because it was done too late.

This fixes emacs without frame-resize-pixelwise.

CC #6.
This was referenced May 10, 2017
@wd5gnr
Copy link

wd5gnr commented Sep 16, 2018

Ok for at least VLC and gtkwave I have this working with a work-around. Here's the trick.

Go to the KDE control panel and under Window Management, pick Window Rules.

Open the bad app and do what you have to do to get it working (full screen then not full screen, for example, or just shuffle some windows around). Then press New on the Windows rule screen. There's a detect windows property button. Make sure the target program is visible and press the button. Then go click on the window. Then go back and pick the Size & Position tab.

I selected Ignore Requested Geometry, Force Temporarily, "Yes"

That seems to clear it up for both programs. I would think it would work for other programs too and, if not, maybe some of the other options (e.g., forcing initial placement) would.

Not a fix per se, but it does make it workable.

@wd5gnr
Copy link

wd5gnr commented Sep 16, 2018

By the way. I unblacklisted the "wine" window class and did a rule with a substring match of <space>wine (that's a real space not the word ) and applied that same fix and now several Wine programs I use tile properly and behave. In addition, the same fix works for Arduino (with a rule pointing at its window class, of course).

@ilkerhk
Copy link

ilkerhk commented Nov 13, 2018

I still observe this issue with various applications, mostly with Firefox, Virtualbox and Matlab.
I think there is a workaround for Firefox. I am trying it for the last few days, so far so good.
Simply block sites to resize their window using the below parameter in about:config:

dom.disable_window_move_resize (default=false, set to true to block sites)

@gagbo
Copy link

gagbo commented Feb 12, 2019

These workaround might be worth to add in the README (in the troubleshooting section with the "getting settings menu to appear in ksettings"). I just used the emacs trick (which works on 26.1 on Fedora Rawhide/30 ), but it might be easier to find this on the README

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

No branches or pull requests

7 participants