What windows are "popup windows"?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

What windows are "popup windows"?

John Found
In XFCE, compositing window manager, there is an option "Show shadows under popup windows".
But what windows are considered "popup" in XFCE compositor?

I have windows with override_redirect = 1, that are not decorated by the WM (as intended) but they
never get shadows under. In addition I tried to set property _NET_WM_WINDOW_TYPE_POPUP_MENU, but
with null result.

Regards
--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

Silvio Knizek-2
Am 17.11.2015 um 19:19 schrieb John Found:
> In XFCE, compositing window manager, there is an option "Show shadows under popup windows".
> But what windows are considered "popup" in XFCE compositor?
>
> I have windows with override_redirect = 1, that are not decorated by the WM (as intended) but they
> never get shadows under. In addition I tried to set property _NET_WM_WINDOW_TYPE_POPUP_MENU, but
> with null result.
>
> Regards
>
The shadow is a property of the window decoration. No decoraton → no shadow.

Regards
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

John Found
On Tue, 17 Nov 2015 20:08:42 +0100
killermoehre <[hidden email]> wrote:

> The shadow is a property of the window decoration. No decoraton → no shadow.

But then how to make popup windows without override_redirect?

In addition, after some more experiments I found out that the option
"Opacity of popup windows" actually works with my popup windows and
I can make them partially transparent this way.

Curiouser and curiouser!

Regards
--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

Olivier Fourdan-3
In reply to this post by John Found
Hi,

Popup windows are indeed override redirect. 

If the shadow do now show, check with another xfwm4 theme, some themes "designers" tend to force their choice on the users and may override your settings.

Cheers,
Olivier


On 17 November 2015 at 19:19, John Found <[hidden email]> wrote:
In XFCE, compositing window manager, there is an option "Show shadows under popup windows".
But what windows are considered "popup" in XFCE compositor?

I have windows with override_redirect = 1, that are not decorated by the WM (as intended) but they
never get shadows under. In addition I tried to set property _NET_WM_WINDOW_TYPE_POPUP_MENU, but
with null result.

Regards
--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev


_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

Olivier Fourdan-3
In reply to this post by Silvio Knizek-2
Hi


On 17 November 2015 at 20:08, killermoehre <[hidden email]> wrote:
The shadow is a property of the window decoration. No decoraton → no shadow.

​Nope, that's not true.

Cheers,
Olivier​
 

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

John Found
In reply to this post by Olivier Fourdan-3
On Tue, 17 Nov 2015 20:46:06 +0100
Olivier Fourdan <[hidden email]> wrote:

> Hi,
>
> Popup windows are indeed override redirect.
>
> If the shadow do now show, check with another xfwm4 theme, some themes
> "designers" tend to force their choice on the users and may override your
> settings.
>
> Cheers,
> Olivier

No effect at all. BTW all other popup menus and hint windows have shadows.
My popup windows can be made transparent with the option "Opacity of popup windows",
but they have no shadow at all.

--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

John Found
So, I think I found it. The reason seems to be that my windows have depth of 32bpp.
When I try to create 24bpp windows, everything works fine. On 32bpp windows the shadows are missing.

Is it a bug or a feature?

The very simplified code I use is the following (excuse my asm ;)

        cinvoke XOpenDisplay, 0
        mov     [hdisplay], eax

        cinvoke XDefaultScreen, eax
        mov     [.hscreen], eax

        cinvoke XDefaultRootWindow, [hdisplay]
        mov     [.hroot], eax

        lea     eax, [.vis]
        cinvoke XMatchVisualInfo, [hdisplay], [.hscreen], $20, TrueColor, eax

        cinvoke XCreateColormap, [hdisplay], [.hroot], [.vis.Visual], AllocNone
        mov     [.attr.colormap], eax

        xor     eax, eax
        mov     [.attr.override_redirect], 1          
        mov     [.attr.backing_store], eax              ; NotUseful
        mov     [.attr.background_pixmap], eax          ; None
        mov     [.attr.border_pixel], eax               ; 0
        mov     [.attr.background_pixel], $ffc0c0c0 ; some gray background
        mov     [.attr.event_mask], ExposureMask or FocusChangeMask or       \
                                    KeyPressMask or KeyReleaseMask or        \
                                    ButtonPressMask or ButtonReleaseMask or  \
                                    EnterWindowMask or LeaveWindowMask or    \
                                    PointerMotionMask or StructureNotifyMask

        lea     eax, [.attr]
        cinvoke XCreateWindow, [hdisplay], [.hroot], [.x], [.y], [.w], [.h], 0, $20, InputOutput, [.vis.Visual],       \
                               CWBackingStore or CWOverrideRedirect or CWBorderPixel or        \
                               CWColormap or CWEventMask or CWBackPixmap or CWBackPixel, eax




On Tue, 17 Nov 2015 22:12:41 +0200
John Found <[hidden email]> wrote:

> On Tue, 17 Nov 2015 20:46:06 +0100
> Olivier Fourdan <[hidden email]> wrote:
>
> > Hi,
> >
> > Popup windows are indeed override redirect.
> >
> > If the shadow do now show, check with another xfwm4 theme, some themes
> > "designers" tend to force their choice on the users and may override your
> > settings.
> >
> > Cheers,
> > Olivier
>
> No effect at all. BTW all other popup menus and hint windows have shadows.
> My popup windows can be made transparent with the option "Opacity of popup windows",
> but they have no shadow at all.
>
> --
> http://fresh.flatassembler.net
> http://asm32.info
> John Found <[hidden email]>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev


--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

Olivier Fourdan-3
Perfectly normal, if you use ARGB windows, xfwm4 compositor won't apply shadows to your window because it doesn "know" the actual shape of the content (being ARGB).

Cheers,
Olivier

On 17 November 2015 at 23:21, John Found <[hidden email]> wrote:
So, I think I found it. The reason seems to be that my windows have depth of 32bpp.
When I try to create 24bpp windows, everything works fine. On 32bpp windows the shadows are missing.

Is it a bug or a feature?

The very simplified code I use is the following (excuse my asm ;)

        cinvoke XOpenDisplay, 0
        mov     [hdisplay], eax

        cinvoke XDefaultScreen, eax
        mov     [.hscreen], eax

        cinvoke XDefaultRootWindow, [hdisplay]
        mov     [.hroot], eax

        lea     eax, [.vis]
        cinvoke XMatchVisualInfo, [hdisplay], [.hscreen], $20, TrueColor, eax

        cinvoke XCreateColormap, [hdisplay], [.hroot], [.vis.Visual], AllocNone
        mov     [.attr.colormap], eax

        xor     eax, eax
        mov     [.attr.override_redirect], 1
        mov     [.attr.backing_store], eax              ; NotUseful
        mov     [.attr.background_pixmap], eax          ; None
        mov     [.attr.border_pixel], eax               ; 0
        mov     [.attr.background_pixel], $ffc0c0c0     ; some gray background
        mov     [.attr.event_mask], ExposureMask or FocusChangeMask or       \
                                    KeyPressMask or KeyReleaseMask or        \
                                    ButtonPressMask or ButtonReleaseMask or  \
                                    EnterWindowMask or LeaveWindowMask or    \
                                    PointerMotionMask or StructureNotifyMask

        lea     eax, [.attr]
        cinvoke XCreateWindow, [hdisplay], [.hroot], [.x], [.y], [.w], [.h], 0, $20, InputOutput, [.vis.Visual],       \
                               CWBackingStore or CWOverrideRedirect or CWBorderPixel or        \
                               CWColormap or CWEventMask or CWBackPixmap or CWBackPixel, eax




On Tue, 17 Nov 2015 22:12:41 +0200
John Found <[hidden email]> wrote:

> On Tue, 17 Nov 2015 20:46:06 +0100
> Olivier Fourdan <[hidden email]> wrote:
>
> > Hi,
> >
> > Popup windows are indeed override redirect.
> >
> > If the shadow do now show, check with another xfwm4 theme, some themes
> > "designers" tend to force their choice on the users and may override your
> > settings.
> >
> > Cheers,
> > Olivier
>
> No effect at all. BTW all other popup menus and hint windows have shadows.
> My popup windows can be made transparent with the option "Opacity of popup windows",
> but they have no shadow at all.
>
> --
> http://fresh.flatassembler.net
> http://asm32.info
> John Found <[hidden email]>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev


--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev


_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

John Found
On Wed, 18 Nov 2015 10:47:28 +0100
Olivier Fourdan <[hidden email]> wrote:

> Perfectly normal, if you use ARGB windows, xfwm4 compositor won't apply
> shadows to your window because it doesn "know" the actual shape of the
> content (being ARGB).
>

Oh, I see. But actually the compositor knows the shape - it is the alpha channel.

Best Regards
--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

Olivier Fourdan-3
No it doesn't really, the alpha channel is not just opaque/transparent, it's a whole range of transparency. Only thing that /could/ give a hint is the input shape, if used. But then it would be just daft and break in many different common use cases.

If your app uses an alpha channel, it ought to draw its shadows itself the way it wants (like CSD windows with gtk+). Applying shadows on top of CSD GTK CSD windows for example would look dreadful.

Cheers,
Olivier

On 18 November 2015 at 11:57, John Found <[hidden email]> wrote:
On Wed, 18 Nov 2015 10:47:28 +0100
Olivier Fourdan <[hidden email]> wrote:

> Perfectly normal, if you use ARGB windows, xfwm4 compositor won't apply
> shadows to your window because it doesn "know" the actual shape of the
> content (being ARGB).
>

Oh, I see. But actually the compositor knows the shape - it is the alpha channel.

Best Regards
--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev


_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: What windows are "popup windows"?

John Found
On Wed, 18 Nov 2015 15:01:03 +0100
Olivier Fourdan <[hidden email]> wrote:

> No it doesn't really, the alpha channel is not just opaque/transparent,
> it's a whole range of transparency. Only thing that /could/ give a hint is
> the input shape, if used. But then it would be just daft and break in many
> different common use cases.

Yes, it does. The semi transparent objects drop shadows and they are possible
to be drawn (in fact every graphical editor can draw shadows of semi transparent
pictures)

> If your app uses an alpha channel, it ought to draw its shadows itself the
> way it wants (like CSD windows with gtk+). Applying shadows on top of CSD
> GTK CSD windows for example would look dreadful.
 
Of course, the GUI toolkits should be able to reject such effects. But the
window manager should not take in consideration the tricks of every particular
GUI toolkit.

But well, I understand why the WM behaves this way and for me it is enough.
I will not argue anymore about the particular design choices, because I am not the one
that should decide what and how to be implemented.

Thanks for the help!
Best Regards
--
http://fresh.flatassembler.net
http://asm32.info
John Found <[hidden email]>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev