On Fri, May 15, 2020 at 10:16:30AM -0700, Eric Joshua Hernandez wrote:
> You were right, that was the issue. My next question is how I can get the 
> value of a window's "user specified location" from the Window object. This 
> is what the property looks like in xprop
> WM_NORMAL_HINTS(WM_SIZE_HINTS): 
>                 user specified location: 0, 0 
>                 user specified size: 2560 by 1440 
>                 window gravity: Static
> 
> 
> The get_normal_hints() method of the Window class looks like this:
> 
>     def get_wm_normal_hints(self):
>        wm_normal_hints = self.get_property(
>            "WM_NORMAL_HINTS",
>            xcffib.xproto.GetPropertyType.Any
>        )
>        if wm_normal_hints:
>            atom_list = wm_normal_hints.value.to_atoms()
>            flags = {k for k, v in NormalHintsFlags.items() if atom_list[0] & 
> v}
>            return {
>                "flags": flags,
>                "min_width": atom_list[1 + 4],
>                "min_height": atom_list[2 + 4],
>                "max_width": atom_list[3 + 4],
>                "max_height": atom_list[4 + 4],
>                "width_inc": atom_list[5 + 4],
>                "height_inc": atom_list[6 + 4],
>                "min_aspect": atom_list[7 + 4],
>                "max_aspect": atom_list[8 + 4],
>                "base_width": atom_list[9 + 4],
>                "base_height": atom_list[9 + 4],
>                "win_gravity": atom_list[9 + 4],
>            }
> 
>  It doesn't look like "user specified location" is in the dictionary 
> returned by that method. Is there a way to capture this hint?

Try get_geometry(). Related PR you might be interested in here, which
fixes user specified window placement:

https://github.com/qtile/qtile/pull/1710

Tycho

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/20200515191722.GA1915115%40cisco.

Reply via email to