window manager development thread - Desktop Customization & Workflow

Users browsing this thread: 1 Guest(s)
Guest0x0
Members
(21-02-2021, 10:57 PM)phillbush Wrote: I just had a bad time trying to draw into borders. I thought the 0,0 position of the border was its top left corner, but it actually coincides with the 0,0 origin of the window. So I have to draw on the right and bottom edges of a pixmap in order for it to map into the left and top edges of the borders. Completely non-intuitive. I took a look at 2bwm code to see how it does. But then I gave up and stuck with the solid color border. Maybe I will try drawing borders when I try reparenting again.
Exactly the same issue here... I did a hell lot of experiments to finally figure out how the coordinate system works. I have found this in 2bwm's source code, but no luck in X's manual... And I still don't know WHY the coordinate system was designed as such... Basically the coordinates goes to minus border_width after exceeding inner_width/inner_height + border_width.

(21-02-2021, 10:57 PM)phillbush Wrote: Configuration can be done with client messages. My wm is controlled solely via client messages to the root window and to the managed clients. The downside is that you have to stick with the EWMH hints (or create your own non-standard hints). I stuck with the EWMH hints, but I gave another interpretation to some of them (like using the maximization hints to do tiling, for example).
In my scenario I am not using client message to enable ordinary programs to communicate with the WM, simply as a way to communicate between the WM and a CLI client, just like bspwm, herbstlu, etc. So there is no special need to stick with EWMH here, I guess. I simply allocate a new atom for configuration messages, and pass plain text commands. BerrryWM uses this way, too. However my case is a trickier, because some commands in my WM involve names and are of variable length, while a X client message can hold only 20 bytes of data. So I have to slice every command into several client messages, and join these messages back at the WM side. Dirty, but works so far.


Messages In This Thread
window manager development thread - by phillbush - 30-08-2020, 09:10 PM
RE: window manager development thread - by venam - 31-08-2020, 03:36 AM
RE: window manager development thread - by movq - 22-02-2021, 08:37 AM
RE: window manager development thread - by Guest0x0 - 25-02-2021, 09:36 PM