# How to indicate that a window type is desktop in SDL

**URL:** <https://discourse.libsdl.org/t/how-to-indicate-that-a-window-type-is-desktop-in-sdl/16510>\
**Category:** SDL Development\
**Created:** [August 2, 2009, 11:42am UTC](https://discourse.libsdl.org/t/how-to-indicate-that-a-window-type-is-desktop-in-sdl/16510 "2009-08-02T11:42:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony.Li](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@Tony.Li](https://discourse.libsdl.org/u/Tony.Li)\
**Post date:** [August 2, 2009, 11:42am UTC](https://discourse.libsdl.org/t/how-to-indicate-that-a-window-type-is-desktop-in-sdl/16510/1 "2009-08-02T11:42:20Z")

</div>

Hi,everyone

I’m trying to make a SDL application as a desktop environment such as  
KDE,XFCE…

But I don’t know how to indicate a window type is desktop which the  
windows manager can recognise.

With Qt, I can do this by the codes as fllows:

setAttribute(Qt::WA\_X11NetWmWindowTypeDesktop);  
setWindowFlags(Qt::SplashScreen);

Qt::WindowFlags flags = 0;  
flags |= Qt::FramelessWindowHint;  
flags |= Qt::Tool;  
flags |= Qt::WindowStaysOnBottomHint;

```
setWindowFlags(flags);

```

I haven’t found the similar function in SDL API reference,how can I  
achieve that in SDL ?

Any help or suggestions will be greatly appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [August 7, 2009, 9:43am UTC](https://discourse.libsdl.org/t/how-to-indicate-that-a-window-type-is-desktop-in-sdl/16510/2 "2009-08-07T09:43:51Z")

</div>

SDL doesn’t currently support that functionality. It’s an interesting idea  
though, I’ll put it on the list for SDL 1.3.On Sun, Aug 2, 2009 at 4:42 AM, Tony.Li \<[lichuan.cn](http://lichuan.cn) at [gmail.com](http://gmail.com)\> wrote:

> Hi,everyone
> 
> I’m trying to make a SDL application as a desktop environment such as  
> KDE,XFCE…
> 
> But I don’t know how to indicate a window type is desktop which the  
> windows manager can recognise.
> 
> With Qt, I can do this by the codes as fllows:
> 
> setAttribute(Qt::WA\_X11NetWmWindowTypeDesktop);  
> setWindowFlags(Qt::SplashScreen);
> 
> Qt::WindowFlags flags = 0;  
> flags |= Qt::FramelessWindowHint;  
> flags |= Qt::Tool;  
> flags |= Qt::WindowStaysOnBottomHint;
> 
> ```
> setWindowFlags(flags);
> 
> ```
> 
> I haven’t found the similar function in SDL API reference,how can I  
> achieve that in SDL ?
> 
> Any help or suggestions will be greatly appreciated.
> 
> Thanks.
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

–  
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

---

<div class="post-metadata">

**Author:** ![Tony.Li](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@Tony.Li](https://discourse.libsdl.org/u/Tony.Li)\
**Post date:** [August 7, 2009, 3:51pm UTC](https://discourse.libsdl.org/t/how-to-indicate-that-a-window-type-is-desktop-in-sdl/16510/3 "2009-08-07T15:51:24Z")

</div>

Thank you very mouch for your response.

I’m looking forward to SDL 1.3.I think many small devices need a  
more beautiful UI and SDL is cool engough…

2009/8/7 Sam Lantinga \> SDL doesn’t currently support that functionality. It’s an interesting idea

> though, I’ll put it on the list for SDL 1.3.
> 
> On Sun, Aug 2, 2009 at 4:42 AM, Tony.Li \<@Tony.Li\> wrote:
> 
> > Hi,everyone
> > 
> > I’m trying to make a SDL application as a desktop environment such as  
> > KDE,XFCE…
> > 
> > But I don’t know how to indicate a window type is desktop which the  
> > windows manager can recognise.
> > 
> > With Qt, I can do this by the codes as fllows:
> > 
> > setAttribute(Qt::WA\_X11NetWmWindowTypeDesktop);  
> > setWindowFlags(Qt::SplashScreen);
> > 
> > Qt::WindowFlags flags = 0;  
> > flags |= Qt::FramelessWindowHint;  
> > flags |= Qt::Tool;  
> > flags |= Qt::WindowStaysOnBottomHint;
> > 
> > ```
> > setWindowFlags(flags);
> > 
> > ```
> > 
> > I haven’t found the similar function in SDL API reference,how can I  
> > achieve that in SDL ?
> > 
> > Any help or suggestions will be greatly appreciated.
> > 
> > Thanks.
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> –  
> -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
