Hello,
the splash screen of libreoffice is created by Xpra with decorations (title bar and so on). When I run libreoffice locally on the same machine the splash screen isn't decorated.
Assuming this has ever worked properly (test with old version - we never call set_decorated
!), here are obvious places to look for this bug:
init_window
since r640:
if override_redirect: init_window(self, WINDOW_POPUP) else: init_window(self, WINDOW_TOPLEVEL)
transient-for
" flag?
NAME_TO_HINT
mapping?
OK, this has never worked properly..
According to ICCCM section 4.1.10 on popup windows, clients can tell the window manager not to decorate a window by:
WM_TRANSIENT_FOR
override-redirect
Neither is set in this present case! So I don't understand why the window manager would not decorate this splash screen!
In the process, I looked into the "window-type" code, and it looks like the refactoring that moved override-redirect
to the common superclass inadvertently sets override redirect windows to the wrong window type if one is not set: this is fixed in r702.
As for explicitly setting set_decorated(False)
} in the client, I have code to do this (see forthcoming patch) but this would not help in this case since the window-type hint is not set...
ensures that most window types are undecorated (except NORMAL)
The WM I'm using is Fluxbox. Perhaps this window is decorated with other WMs but I doubt it.. it's a splash screen after all.
Downloaded the source and found that it does this to disable decorations:
// The old method of hiding the window decorations static void suppress_decorations_motif(struct splash* splash) { struct { unsigned long flags, functions, decorations; long input_mode; } mwmhints; Atom a = XInternAtom( splash->display, "_MOTIF_WM_HINTS", False ); mwmhints.flags = 15; // functions, decorations, input_mode, status mwmhints.functions = 2; // ? mwmhints.decorations = 0; mwmhints.input_mode = 0; XChangeProperty( splash->display, splash->win, a, a, 32, PropModeReplace, (unsigned char*)&mwmhints, 5 ); } // This is a splash, set it as such. // If it fails, just hide the decorations... static void suppress_decorations(struct splash* splash) { Atom atom_type = XInternAtom( splash->display, "_NET_WM_WINDOW_TYPE", True ); Atom atom_splash = XInternAtom( splash->display, "_NET_WM_WINDOW_TYPE_SPLASH", True ); if ( atom_type != None && atom_splash != None ) XChangeProperty( splash->display, splash->win, atom_type, XA_ATOM, 32, PropModeReplace, (unsigned char*)&atom_splash, 1 ); //else suppress_decorations_motif(splash); // FIXME: Unconditional until Metacity/compiz's SPLASH handling is fixed }
Changing the _NET_WM_WINDOW_TYPE
property to _NET_WM_WINDOW_TYPE_SPLASH
ought to be enough, not sure we want to do anything with _MOTIF_WM_HINTS
(this is old legacy stuff)
fixes openoffice by defining all the x11 atoms in advance
This looks like a bug in openoffice: the x11 atoms do not have to exist in advance to be used. Workaround applied in r704: we pre-define the values that openoffice wants to use. If we want to go further, the patch above pre-defines all the x11 atoms we use (not sure this is needed - but maybe would avoid some bugs?)
Milestone current deleted
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/98