GithubHelp home page GithubHelp logo

Comments (10)

jaywilkas avatar jaywilkas commented on May 26, 2024

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.

j-zero avatar j-zero commented on May 26, 2024

I think this happens because of two things:

  1. 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.
  2. 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.

jaywilkas avatar jaywilkas commented on May 26, 2024

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.

j-zero avatar j-zero commented on May 26, 2024

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.

jaywilkas avatar jaywilkas commented on May 26, 2024

The script now checks whether a windows uses client-side-decoration and if so doesn't toggle the borders.

from xpytile.

j-zero avatar j-zero commented on May 26, 2024

Damn, it works like charm. Thank you!

from xpytile.

j-zero avatar j-zero commented on May 26, 2024

Oh, next problem. What about Qt applications with CSD? They have the same problem.

from xpytile.

jaywilkas avatar jaywilkas commented on May 26, 2024

Hi j-zero,

can you tell me which (preferably) small Qt application with CSD causes the same problem?

from xpytile.

j-zero avatar j-zero commented on May 26, 2024

For me it's the original Telegram client.

from xpytile.

jaywilkas avatar jaywilkas commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.