Implement support for NETWM utility window type

Mike Hearn mike at theoretic.com
Thu Dec 4 06:16:49 CST 2003


Hi Alexandre,

This too missed the last couple of commits. Did I get the style stuff
wrong?

On Mon, 2003-12-01 at 00:40, Mike Hearn wrote:
> ChangeLog:
> Map (WS_EX_TOOLWINDOW & WS_CAPTION) to _NET_WM_WINDOW_TYPE_UTILITY.
> This makes Delphi a bit easier to use, as floating palettes aren't
> unmanaged anymore.
> 
> Index: dlls/x11drv/x11drv.h
> ===================================================================
> RCS file: /home/wine/wine/dlls/x11drv/x11drv.h,v
> retrieving revision 1.11
> diff -u -b -r1.11 x11drv.h
> --- dlls/x11drv/x11drv.h        25 Nov 2003 03:27:38 -0000      1.11
> +++ dlls/x11drv/x11drv.h        1 Dec 2003 00:38:03 -0000
> @@ -395,6 +395,8 @@
>      XATOM__NET_WM_PID,
>      XATOM__NET_WM_PING,
>      XATOM__NET_WM_NAME,
> +    XATOM__NET_WM_WINDOW_TYPE,
> +    XATOM__NET_WM_WINDOW_TYPE_UTILITY,
>      XATOM_XdndAware,
>      XATOM_XdndEnter,
>      XATOM_XdndPosition,
> Index: dlls/x11drv/window.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/x11drv/window.c,v
> retrieving revision 1.65
> diff -u -b -r1.65 window.c
> --- dlls/x11drv/window.c        21 Nov 2003 21:48:36 -0000      1.65
> +++ dlls/x11drv/window.c        1 Dec 2003 00:38:03 -0000
> @@ -81,6 +81,8 @@
>      "_NET_WM_PID",
>      "_NET_WM_PING",
>      "_NET_WM_NAME",
> +    "_NET_WM_WINDOW_TYPE",
> +    "_NET_WM_WINDOW_TYPE_UTILITY",
>      "XdndAware",
>      "XdndEnter",
>      "XdndPosition",
> @@ -119,7 +121,8 @@
>      if (win->dwExStyle & WS_EX_TRAYWINDOW) return TRUE;
>      /* child windows are not managed */
>      if (win->dwStyle & WS_CHILD) return FALSE;
> -    /* tool windows are not managed */
> +    /* tool windows are not managed unless they have a caption  */
> +    if ((win->dwExStyle & WS_EX_TOOLWINDOW) && ((win->dwStyle & WS_CAPTION) == WS_CAPTION)) return TRUE;
>      if (win->dwExStyle & WS_EX_TOOLWINDOW) return FALSE;
>      /* windows with caption or thick frame are managed */
>      if ((win->dwStyle & WS_CAPTION) == WS_CAPTION) return TRUE;
> @@ -424,6 +427,12 @@
>      XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_PID),
>                      XA_CARDINAL, 32, PropModeReplace, (char *)&i, 1);
>   
> +    /* map WS_EX_TOOLWINDOW to _NET_WM_WINDOW_TYPE_UTILITY */
> +    if ((win->dwExStyle & WS_EX_TOOLWINDOW) && (win->dwStyle & WS_CAPTION)) {
> +       Atom a = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
> +       XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE), XA_ATOM, 32, PropModeReplace, (char*)&a, 1);
> +    }
> +
>      mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
>      mwm_hints.functions = 0;
>      if ((win->dwStyle & WS_CAPTION) == WS_CAPTION) mwm_hints.functions |= MWM_FUNC_MOVE;
> @@ -785,6 +794,8 @@
>                                          0 );
>      }
>   
> +
> +
>      /* non-maximized child must be at bottom of Z order */
>      if ((win->dwStyle & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
>      {
> 
> 
> 




More information about the wine-devel mailing list