Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Unix] Can I use SFML to make a bar/docking window?  (Read 1703 times)

0 Members and 1 Guest are viewing this topic.

naim42

  • Guest
[Unix] Can I use SFML to make a bar/docking window?
« on: June 27, 2018, 02:20:51 pm »
So I've been wanting to make a bar for the X window system, based on the idea of lemonbar but using SFML for high-level graphics. This requires setting a few window properties like _NET_WM_WINDOW_TYPE for the window to be considered as a dock instead of a regular window, but I haven't been able to find a proper way to do this while having the window "handled" by SFML.

I tried creating a window with SFML and then setting the properties using Xlib functions on the window's WindowHandle, but this doesn't work because my WM apparently draws the window's borders when the window is first mapped, and they remain afterwards. (I didn't dig much into that phenomenon but the whole idea didn't seem reliable anyway.)

I tried creating the window myself using Xlib functions, setting the properties, and then creating a sf::Window with the WindowHandle constructor, but SFML still resets the window type to NORMAL on initialization.

I tried overriding protected functions of the Window class (onCreate and initialize), but apparently those are for internal use only and didn't work as expected.

I feel like I'm trying to use SFML for something it simply isn't designed for at the moment. Does anyone have hints as to how to accomplish this? Would it be feasible to add some plumbing to SFML to manipulate windows at a low level upon creation (what I initially thought onCreate was for)?

Thanks in advance for your time.