Create window without title bar

前端 未结 2 2012
伪装坚强ぢ
伪装坚强ぢ 2021-01-15 18:03

I am trying to create a simple panel for Openbox in Arch Linux using c++, but I cannot figure out how to remove the title bar from a window.

I am creating the window

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 18:38

    Since I found the solution, I figured I'd post the solution here if anyone else needs it.

    As @JoachimPileborg mentioned, I needed to alter the Openbox settings in ~/.config/openbox/rc.xml. Inside the tag, I added the following code:

    
      no
      
    
    

    The class="*" means that all applications will follow these rules, you could fill in the class name of the application instead. The no removes the title bar, and ensures that my own script is able to handle the positioning. You could also add another tag after this one to make exceptions to this rule.

    Also, the window_attributes.override_redirect = True; is not needed anymore.

提交回复
热议问题