! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfwm4 -- what window info is needed for it to decorate created windows
Status:
RESOLVED: INVALID

Comments

Description Philip Kovacs 2006-03-07 05:35:47 CET
XSetWindowAttributes attrs = {
                               ParentRelative,0L,0,0L,0,0,Always,0L,0L,False,
                               StructureNotifyMask|ExposureMask|ButtonPressMask,
                               0L,False,0,0 };

                        XClassHint classHint;
                        XWMHints wmHint;
                        Atom xa;
                        char window_title[256];

                        window.root = find_desktop_window();

                        window.window = XCreateWindow(display, window.root,
                                                   window.x, window.y, w, h, 0,
                                                   CopyFromParent,
                                                   InputOutput,
                                                   CopyFromParent,
                                                 CWBackPixel|CWOverrideRedirect,
                                                      &attrs);

This is not xfce code, but rather Xlib window creation code from an ordinary
XLib app.   I am trying to figure out why the window is not under XFWM4 control
when the app starts.  It's as if the override_redirect true were set, and it is
not.   Other window managers: fluxbox, openbox, fvwm are able to control and
decorate this window.  xfwm4 neither sees nor decorates it.

What other information do I need to set so XFWM4 can manage the window.
Is it looking for specific hints?

Thanks.

Reproducible: Always
Steps to Reproduce:
1. 
2. 
3.
Comment 1 Olivier Fourdan editbugs 2006-03-07 06:33:57 CET
Can you provide a complete example instead of just a part of code that exhibits
the issue?
Comment 2 Olivier Fourdan editbugs 2006-03-07 06:39:36 CET
Also what "xwininfo" says?
Comment 3 Olivier Fourdan editbugs 2006-03-07 07:00:23 CET
xfwm4 uses the pretty standard way of calling XGetWindowAttributes (dpy, w,
&attr) to retrieve the window attributes (XWindowAttributes structure) and
checking for override_redirect field to determine if it's an override redirect
window.
Comment 4 Philip Kovacs 2006-03-07 17:26:41 CET
I found the answer to this issue and it's my code, not xfwm4.  If you look at
the code I attached, I create the new window with parent =
find_desktop_window().  This funtion uses standard tricks to find the root
window for various desktops.   It was, however, returning the desktop wallpaper
window, a subwindow of the root, instead of the root.  When you parent a new
window to a non-root window, it's transient to the window manager and therefore
not decorated.

I changed the routine to parent to the root and, fortunately,
pseudo-transparency to the wallpaper is still working.

In the other environments, find_desktop_window() was returning the effective
root window and so those WM's decorated the window.

RESOLVED.

Phil

Bug #1554

Reported by:
Philip Kovacs
Reported on: 2006-03-07
Last modified on: 2010-12-23

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Attachments

Additional information