Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I want to reserve space for the taskbar using Xlib.
Qt 6.11 is out! See what's new in the release blog

I want to reserve space for the taskbar using Xlib.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 791 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • taaDeveloperT Offline
    taaDeveloperT Offline
    taaDeveloper
    wrote on last edited by
    #1

    I'm currently working on my own Linux distribution, and I'm designing a window that behaves like a taskbar.
    I researched how to secure an exclusive area for the taskbar,
    and found out that it's possible by modifying the X11 _NET_WM_STRUT property.
    I tried the code below, but it doesn't work.
    How can I make it work?

    Display *display  = QX11Info::display();
    
        long insets[4] = {0, 0, 500, 0};
    
        XChangeProperty(display,
                        winId(),
                        XInternAtom(display, "_NET_WM_STRUT", False),
                        XInternAtom(display,"CARDINAL",False) ,
                        32,
                        PropModeReplace,
                        (unsigned char *)&insets, 4);
    
    Pl45m4P 1 Reply Last reply
    0
    • taaDeveloperT taaDeveloper

      I'm currently working on my own Linux distribution, and I'm designing a window that behaves like a taskbar.
      I researched how to secure an exclusive area for the taskbar,
      and found out that it's possible by modifying the X11 _NET_WM_STRUT property.
      I tried the code below, but it doesn't work.
      How can I make it work?

      Display *display  = QX11Info::display();
      
          long insets[4] = {0, 0, 500, 0};
      
          XChangeProperty(display,
                          winId(),
                          XInternAtom(display, "_NET_WM_STRUT", False),
                          XInternAtom(display,"CARDINAL",False) ,
                          32,
                          PropModeReplace,
                          (unsigned char *)&insets, 4);
      
      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @taaDeveloper

      How is your question related to Qt? Isn't it pure X11 / Linux specific code?

      How can I make it work?

      I assume not with Qt, it might be out of range of something you can control by using Qt.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • taaDeveloperT Offline
        taaDeveloperT Offline
        taaDeveloper
        wrote on last edited by
        #3

        Im Sorry... I shouldn't have asked this in a Qt topic, since what I asked about was an Xlib issue...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You might want to check projects such as LXQt that provides a desktop environment built on Qt for inspiration.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved