wmutils / contrib

Useful bits and pieces
Other
93 stars 16 forks source link

fullscreen.sh $(pfw) doesn't work for tabbed+vimb #33

Closed artyommironov closed 8 years ago

artyommironov commented 8 years ago

vimb started by command: tabbed -c vimb -e If I set wid manually then it works. Is it possible to workaround this?

z3bra commented 8 years ago

When you run vimb within tabbed, vimb will become a child window of tabbed. When you run pfw, the window ID printed out is vimb's one, not tabbed's. So when you run

fullscreen.sh $(pfw)

you ask vimb to go fullscreen, but it seems like it cannot, as tabbed "forces" vimb to behave. If you run fullscreen.sh with tabbed's wid, it works as expected though. I don't know if tabbed has a way to comply to requests sent to its children, but I feel like this would be the way to go. I might be wrong though, as I never had to play with windows trees.

One "quick hack" I can think of is to check wether the WID given to fullscreen.sh appears in lsw output, and if it doesn't, search its parent to send the request to the appropriate window. One could patch fullscreen.sh (see attached patched), but it is pretty hacky. It doesn't recursively search for WID, and upon puttin tabbed fullscreen, vimb doesn't get resized. It looks like a bug in tabbed and it should IMO pass the resize even down to its children. You could hack around even further on top of the provided patch, but such a solution would never get merged/distributed in the contrib repo, at it looks more like a hack than a real solution. fullscreen-child.patch.txt

artyommironov commented 8 years ago

Thanks, your patch works in my case. tabbed gets resized with its children.