Xpra: Ticket #98: Libreoffice splash screen is created with decorations

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.



Wed, 04 Apr 2012 10:17:47 GMT - Antoine Martin: status, version changed

Assuming this has ever worked properly (test with old version - we never call set_decorated!), here are obvious places to look for this bug:


Wed, 04 Apr 2012 11:28:29 GMT - Antoine Martin:

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:

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...


Wed, 04 Apr 2012 11:29:15 GMT - Antoine Martin: attachment set

ensures that most window types are undecorated (except NORMAL)


Wed, 04 Apr 2012 11:40:08 GMT - ahuillet:

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.


Wed, 04 Apr 2012 13:06:25 GMT - Antoine Martin:

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)


Wed, 04 Apr 2012 19:15:13 GMT - Antoine Martin: attachment set

fixes openoffice by defining all the x11 atoms in advance


Wed, 04 Apr 2012 19:19:02 GMT - Antoine Martin: status changed; resolution set

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?)


Fri, 04 May 2012 10:00:58 GMT - Antoine Martin: milestone deleted

Milestone current deleted


Sat, 23 Jan 2021 04:45:29 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/98