Comments (10)
I must admit, currently I don't have a clue.
Let me try to figure this out.
As a work around you could turn off CSD for Firefox.
from xpytile.
I think this happens because of two things:
- You force the server-side decoration with
window.change_property(MOTIF_WM_HINTS, MOTIF_WM_HINTS, 32, hints)
in the set_decoration method, even if the window originally didn't have server-side decoration. - The window has an invisible border (gtk3/4?) which causes the "inner" window not to fit in the tile.
I'm completely new to Python, GTK3, xlib and stuff. So that are wild guesses 🤷
from xpytile.
I would say you are absolutely right!
To check this out, you can modify xpytile.py and add a return statement in set_window_decoration() as the first statement to let the function return immediately without doing anything. The extra border wont appear, but of course you can't toggle border on/off any more.
Unfortunately this is only one part of the problem. As you can see, the size of the CSD-window is not set correctly because of that 'invisible border'.
So there are two things to be figured out:
- how to find out whether a window has CSD or SSD
- how to cope with the invisible border of CSD windows in order to set their position and size correctly
from xpytile.
I think the first part would be "easy" to fix. My suggestion would be: Don't force the window decoration.
On toggling the borders, just look, if the windows has the MOTIF_WM_HINTS for decoration, if not, don't touch it. If it has: save the window id in an array. If the user toggles back, just reset the hints to the original state.
Same on window creation. Just make a backup and put it back on toggle.
The second part could be a GTK problem, not xlib.
from xpytile.
The script now checks whether a windows uses client-side-decoration and if so doesn't toggle the borders.
from xpytile.
Damn, it works like charm. Thank you!
from xpytile.
Oh, next problem. What about Qt applications with CSD? They have the same problem.
from xpytile.
Hi j-zero,
can you tell me which (preferably) small Qt application with CSD causes the same problem?
from xpytile.
For me it's the original Telegram client.
from xpytile.
In the config-file you can now define which (Qt-)applications have client-side decoration and should not be (un)decorated by xpytile.
from xpytile.
Related Issues (10)
- Strange Spacing HOT 2
- Some Windows With Originally No Borders Have Borders After Running The Script HOT 2
- Ascii char for ctrl+alt or shift+alt HOT 2
- No license HOT 1
- some keybindings stop the program HOT 3
- Can't grab modifier. HOT 6
- Wayland support? HOT 1
- Suggestion: ignore Ulauncher HOT 2
- How to disable auto resize of the terminal windows? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xpytile.