Bug 160697 - Writer opens blank window temporarily at launch
Summary: Writer opens blank window temporarily at launch
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: All Linux (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2024-04-16 16:27 UTC by p.wibberley
Modified: 2024-05-06 06:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screencast with gtk3 VCL plugin (without and with --nologo) (4.19 MB, video/x-matroska)
2024-05-06 06:10 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description p.wibberley 2024-04-16 16:27:09 UTC
When launching Writer in KDE Neon 6.0, a window opens momentarily which is blank apart from "soffice.bin" in the title bar.  It is replaced a moment later by another window with a new Writer document.  None of the other LibreOffice applications seem to do this, but if I open any application and select File->New->Text Document then the same thing happens.  

This doesn't impair functionality but it just looks a bit odd.  

Thanks and regards
Comment 1 Michael Weghorn 2024-05-02 06:11:31 UTC
I don't notice that but maybe it's just happening too fast.

Is this on X11 or Wayland?

If it's on Wayland: Does this also happen when you start LibreOffice with environment variable QT_QPA_PLATFORM=xcb set to force LibreOffice to use Qt's xcb/X11 integration instead?

Can you please copy the version info from "Help" -> "About LibreOffice" here?

If it's Wayland-only, this may be due to the hide/show cycle introduced in order to be able to use app-specific window icons, see commit


    commit cea0371ac77145ad1f3db7e558c279aeed6f4d00
    Author: Michael Weghorn
    Date:   Mon Feb 12 14:09:45 2024 +0100

        tdf#125934 qt: Support module-specific window icons on Wayland

I've mentioned that problem in [1] earlier:

> It obviously has the side-effect that the window disappears for a short amount of time and it still feels a bit like a workaround to me.


The way forward for a proper solution would IMHO require new API in Qt as mentioned in that Qt issue.

[1] https://bugreports.qt.io/browse/QTBUG-77182?focusedId=774291&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-774291
Comment 2 p.wibberley 2024-05-02 09:54:31 UTC
Hi Michael,

Thank you for your comment.  I hope when you say it's happening too fast for you, you're not being rude about my computer!

The version information from 'Help'->'About Libreoffice' is

Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 4:24.2.2~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded

The issue seems to arise with both Wayland and X11.  I tried setting the environment variable - 

env | grep QT
QT_ACCESSIBILITY=1
QT_EXCLUDE_GENERIC_BEARER=1
QT_QPA_PLATFORM=xcb
QT_WAYLAND_RECONNECT=1
QT_AUTO_SCREEN_SCALE_FACTOR=0

- but it doesn't seem to make any difference, and I still briefly get the blank "soffice.bin" window.

As I say, the issue is, of itself, utterly trivial, and I only mentioned it in case it is indicative of something more important being not quite right.  Let me know if there's additional information I can provide.  

Thanks and regards
Comment 3 p.wibberley 2024-05-02 09:59:43 UTC
(In reply to p.wibberley from comment #2)
> Hi Michael,
> 
> Thank you for your comment.  I hope when you say it's happening too fast for
> you, you're not being rude about my computer!
> 
> The version information from 'Help'->'About Libreoffice' is
> 
> Version: 24.2.2.2 (X86_64) / LibreOffice Community
> Build ID: 420(Build:2)
> CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+wayland)
> Locale: en-GB (en_GB.UTF-8); UI: en-GB
> Ubuntu package version: 4:24.2.2~rc2-0ubuntu0.22.04.1~lo1
> Calc: threaded
> 
> The issue seems to arise with both Wayland and X11.  I tried setting the
> environment variable - 
> 
> env | grep QT
> QT_ACCESSIBILITY=1
> QT_EXCLUDE_GENERIC_BEARER=1
> QT_QPA_PLATFORM=xcb
> QT_WAYLAND_RECONNECT=1
> QT_AUTO_SCREEN_SCALE_FACTOR=0
> 
> - but it doesn't seem to make any difference, and I still briefly get the
> blank "soffice.bin" window.
> 
> As I say, the issue is, of itself, utterly trivial, and I only mentioned it
> in case it is indicative of something more important being not quite right. 
> Let me know if there's additional information I can provide.  
> 
> Thanks and regards

Sorry, checked again and it DOES NOT happen with X11.  (Not sure what I did wrong the first time.)
Comment 4 p.wibberley 2024-05-02 10:38:01 UTC
(In reply to p.wibberley from comment #3)
> (In reply to p.wibberley from comment #2)
> > Hi Michael,
> > 
> > Thank you for your comment.  I hope when you say it's happening too fast for
> > you, you're not being rude about my computer!
> > 
> > The version information from 'Help'->'About Libreoffice' is
> > 
> > Version: 24.2.2.2 (X86_64) / LibreOffice Community
> > Build ID: 420(Build:2)
> > CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+wayland)
> > Locale: en-GB (en_GB.UTF-8); UI: en-GB
> > Ubuntu package version: 4:24.2.2~rc2-0ubuntu0.22.04.1~lo1
> > Calc: threaded
> > 
> > The issue seems to arise with both Wayland and X11.  I tried setting the
> > environment variable - 
> > 
> > env | grep QT
> > QT_ACCESSIBILITY=1
> > QT_EXCLUDE_GENERIC_BEARER=1
> > QT_QPA_PLATFORM=xcb
> > QT_WAYLAND_RECONNECT=1
> > QT_AUTO_SCREEN_SCALE_FACTOR=0
> > 
> > - but it doesn't seem to make any difference, and I still briefly get the
> > blank "soffice.bin" window.
> > 
> > As I say, the issue is, of itself, utterly trivial, and I only mentioned it
> > in case it is indicative of something more important being not quite right. 
> > Let me know if there's additional information I can provide.  
> > 
> > Thanks and regards
> 
> Sorry, checked again and it DOES NOT happen with X11.  (Not sure what I did
> wrong the first time.)

And it gets more confusing (at least, for me).  In Wayland, setting the QT_QPA_PLATFORM=xcb does make a difference.  If I run libreoffice --writer from a terminal window, the soffice.bin window opens and closes but only very briefly, and much quicker than before the QT_QPA_PLATFORM is set.  However, if I run Writer from the launcher menu, which (as I understand it) has the %U parameter, the soffice.bin window persists for much longer, much the same as before QT_QPA_PLATFORM is set.    

I'm fairly certain that with Calc the soffice.bin window doesn't appear at all, not even for a fleeting moment.
Comment 5 Michael Weghorn 2024-05-02 10:45:25 UTC
Thanks for the additional information.

(In reply to p.wibberley from comment #2)
> I hope when you say it's happening too fast for
> you, you're not being rude about my computer!

Sorry, no offense at all intended. This might also just be myself being too slow to see the temporary window,...

What I can reproduce is:

* start LO start center
* start a new Writer doc from there

-> the start center window disappears, and shortly after that, a Writer window shows up

With QT_QPA_PLATFORM=xcb, the existing window smoothly turns into the Writer window.

Since the issue you're experiencing is also Wayland-only, let's assume it's the same root cause.

[If you want, you can double-check this by trying an older LibreOffice version (e.g. 7.6, or 24.2.1): These don't contain the commit mentioned in comment 1 yet, so shouldn't show that behavior if it's actually the same root cause. (But then, the Writer icon isn't used for the Window icon, which I'd personally consider worse then an initial annoyance on startup.)]


Setting to NEW for now.


Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0d82ddb39e0cdbfde428eb4da7268cac4176f1bd
CPU threads: 32; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 6 Michael Weghorn 2024-05-02 10:47:19 UTC
(In reply to Michael Weghorn from comment #5)
> Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 0d82ddb39e0cdbfde428eb4da7268cac4176f1bd
> CPU threads: 32; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: en-GB (en_GB.UTF-8); UI: en-US
> Calc: threaded

For clarification: The above (xcb) case is the good one (i.e. the one without the hide/show); the one that has the hide/show in between is with the wayland Qt QPA plugin:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0d82ddb39e0cdbfde428eb4da7268cac4176f1bd
CPU threads: 32; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 7 Michael Weghorn 2024-05-02 11:31:52 UTC
(In reply to p.wibberley from comment #4)
> And it gets more confusing (at least, for me).  In Wayland, setting the
> QT_QPA_PLATFORM=xcb does make a difference.  If I run libreoffice --writer
> from a terminal window, the soffice.bin window opens and closes but only
> very briefly, and much quicker than before the QT_QPA_PLATFORM is set. 
> However, if I run Writer from the launcher menu, which (as I understand it)
> has the %U parameter, the soffice.bin window persists for much longer, much
> the same as before QT_QPA_PLATFORM is set. 

Do I understand correctly that even with QT_QPA_PLATFORM=xcb set, the temporary window *does* still appear on Wayland (event if it's shorter)? If so, this is a different issue than for the scenario I describe in comment 5.
Could you please double-check that "Help" -> "About LibreOffice" actually has "VCL: kf5 (cairo+xcb)" in that case, and not "kf5 (cairo+wayland)" (which should be shown when running on Wayland and not setting QT_QPA_PLATFORM=xcb).

Does the "--nologo" argument to disable the splash screen make any difference (i.e. starting as `libreoffice --nologo --writer`)?
Comment 8 p.wibberley 2024-05-02 15:43:46 UTC
Doh(In reply to Michael Weghorn from comment #7)
> (In reply to p.wibberley from comment #4)
> > And it gets more confusing (at least, for me).  In Wayland, setting the
> > QT_QPA_PLATFORM=xcb does make a difference.  If I run libreoffice --writer
> > from a terminal window, the soffice.bin window opens and closes but only
> > very briefly, and much quicker than before the QT_QPA_PLATFORM is set. 
> > However, if I run Writer from the launcher menu, which (as I understand it)
> > has the %U parameter, the soffice.bin window persists for much longer, much
> > the same as before QT_QPA_PLATFORM is set. 
> 
> Do I understand correctly that even with QT_QPA_PLATFORM=xcb set, the
> temporary window *does* still appear on Wayland (event if it's shorter)? If
> so, this is a different issue than for the scenario I describe in comment 5.
> Could you please double-check that "Help" -> "About LibreOffice" actually
> has "VCL: kf5 (cairo+xcb)" in that case, and not "kf5 (cairo+wayland)"
> (which should be shown when running on Wayland and not setting
> QT_QPA_PLATFORM=xcb).
> 
> Does the "--nologo" argument to disable the splash screen make any
> difference (i.e. starting as `libreoffice --nologo --writer`)?

Doh!  I copied the About Libreoffice information before I set QT_QPA_PLATFORM.  

Also, I've clearly been confused by the scope of environment variables here, as 

(a) I can set QT_QPA_PLATFORM in one terminal window and start Writer from there, and I get the extremely brief soffice.bin window - so it's not my computer! - but 

(b) if I open a second terminal then QT_QPA_PLATFORM isn't set and I get a slow soffice.bin window.   

Moreover, About Libreoffice shows "VCL:kf5(cairo+xcb)" with QT_QPA_PLATFORM set but "VCL:kf5(cairo+wayland)" without.  I think this is what you suggest I should see.  I also see that the terminal window without QT_QPA_PLATFORM gives error messages, 

    "qt.qpa.wayland: Wayland does not support QWindow::requestActivate()"
    "This plugin supports grabbing the mouse only for popup windows"

So, presumably, when I'm starting Writer from the launcher menu, it's simply not seeing QT_QPA_PLATFORM that I set in the first terminal window.     

Another observation is that if I open Writer from the first terminal window, and *leave it open* while I start Writer from the second terminal window, then the second instance of Writer behaves as if QT_QPA_PLATFORM *is* set, even though running env in the second terminal window shows that it isn't.  May be we should expect that, but I thought it worth noting.   

Thanks and regards

P
Comment 9 p.wibberley 2024-05-02 17:19:22 UTC
(In reply to p.wibberley from comment #8)
> Doh(In reply to Michael Weghorn from comment #7)
> > (In reply to p.wibberley from comment #4)
> > > And it gets more confusing (at least, for me).  In Wayland, setting the
> > > QT_QPA_PLATFORM=xcb does make a difference.  If I run libreoffice --writer
> > > from a terminal window, the soffice.bin window opens and closes but only
> > > very briefly, and much quicker than before the QT_QPA_PLATFORM is set. 
> > > However, if I run Writer from the launcher menu, which (as I understand it)
> > > has the %U parameter, the soffice.bin window persists for much longer, much
> > > the same as before QT_QPA_PLATFORM is set. 
> > 
> > Do I understand correctly that even with QT_QPA_PLATFORM=xcb set, the
> > temporary window *does* still appear on Wayland (event if it's shorter)? If
> > so, this is a different issue than for the scenario I describe in comment 5.
> > Could you please double-check that "Help" -> "About LibreOffice" actually
> > has "VCL: kf5 (cairo+xcb)" in that case, and not "kf5 (cairo+wayland)"
> > (which should be shown when running on Wayland and not setting
> > QT_QPA_PLATFORM=xcb).
> > 
> > Does the "--nologo" argument to disable the splash screen make any
> > difference (i.e. starting as `libreoffice --nologo --writer`)?
> 
> Doh!  I copied the About Libreoffice information before I set
> QT_QPA_PLATFORM.  
> 
> Also, I've clearly been confused by the scope of environment variables here,
> as 
> 
> (a) I can set QT_QPA_PLATFORM in one terminal window and start Writer from
> there, and I get the extremely brief soffice.bin window - so it's not my
> computer! - but 
> 
> (b) if I open a second terminal then QT_QPA_PLATFORM isn't set and I get a
> slow soffice.bin window.   
> 
> Moreover, About Libreoffice shows "VCL:kf5(cairo+xcb)" with QT_QPA_PLATFORM
> set but "VCL:kf5(cairo+wayland)" without.  I think this is what you suggest
> I should see.  I also see that the terminal window without QT_QPA_PLATFORM
> gives error messages, 
> 
>     "qt.qpa.wayland: Wayland does not support QWindow::requestActivate()"
>     "This plugin supports grabbing the mouse only for popup windows"
> 
> So, presumably, when I'm starting Writer from the launcher menu, it's simply
> not seeing QT_QPA_PLATFORM that I set in the first terminal window.     
> 
> Another observation is that if I open Writer from the first terminal window,
> and *leave it open* while I start Writer from the second terminal window,
> then the second instance of Writer behaves as if QT_QPA_PLATFORM *is* set,
> even though running env in the second terminal window shows that it isn't. 
> May be we should expect that, but I thought it worth noting.   
> 
> Thanks and regards
> 
> P

Oh, and "--nologo" doesn't seem to make any difference.
Comment 10 QA Administrators 2024-05-03 03:17:13 UTC Comment hidden (obsolete)
Comment 11 Michael Weghorn 2024-05-03 05:16:53 UTC
(In reply to p.wibberley from comment #8)
> Also, I've clearly been confused by the scope of environment variables here,
> as 
> 
> (a) I can set QT_QPA_PLATFORM in one terminal window and start Writer from
> there, and I get the extremely brief soffice.bin window - so it's not my
> computer! - but 
> 
> (b) if I open a second terminal then QT_QPA_PLATFORM isn't set and I get a
> slow soffice.bin window.

Yes, an `export QT_QPA_PLATFORM=xcb` only applies for the current terminal, i.e. processes started from there.

> Moreover, About Libreoffice shows "VCL:kf5(cairo+xcb)" with QT_QPA_PLATFORM
> set but "VCL:kf5(cairo+wayland)" without.  I think this is what you suggest
> I should see. 

Yes.

> I also see that the terminal window without QT_QPA_PLATFORM
> gives error messages, 
> 
>     "qt.qpa.wayland: Wayland does not support QWindow::requestActivate()"
>     "This plugin supports grabbing the mouse only for popup windows"

This warning is expected and unrelated.

> So, presumably, when I'm starting Writer from the launcher menu, it's simply
> not seeing QT_QPA_PLATFORM that I set in the first terminal window.  

Yes, exactly.
   
> Another observation is that if I open Writer from the first terminal window,
> and *leave it open* while I start Writer from the second terminal window,
> then the second instance of Writer behaves as if QT_QPA_PLATFORM *is* set,
> even though running env in the second terminal window shows that it isn't. 
> May be we should expect that, but I thought it worth noting.

Yes, that's expected. LibreOffice doesn't start a new process/"session", but reuses the existing one if it's already running.

(In reply to p.wibberley from comment #9)
> Oh, and "--nologo" doesn't seem to make any difference.

Thanks.

So to summarize: There's an "soffice.bin" window showing up temporarily when starting Writer, that then disappears and the actual Writer window shows up. This happens when either running LO as a native Wayland application (starting LO without QT_QPA_PLATFORM=xcb set) and when run with Qt's xcb platform, i.e. on XWayland (starting LO with QT_QPA_PLATFORM=xcb set).
For the Wayland case, that "soffice.bin" window is shown much shorter than for the xcb case, but it's still shown.

Is that correct?

Could you please try whether you see the same when you start LO with environment variable SAL_USE_VCLPLUGIN=gtk3 to force the use of the so-called gtk3 VCL plugin? (Please double-check that "Help" -> "About LibreOffice" shows "VCL: gtk3" then.)
Comment 12 p.wibberley 2024-05-03 10:58:30 UTC
(In reply to Michael Weghorn from comment #11)
> (In reply to p.wibberley from comment #8)
> > Also, I've clearly been confused by the scope of environment variables here,
> > as 
> > 
> > (a) I can set QT_QPA_PLATFORM in one terminal window and start Writer from
> > there, and I get the extremely brief soffice.bin window - so it's not my
> > computer! - but 
> > 
> > (b) if I open a second terminal then QT_QPA_PLATFORM isn't set and I get a
> > slow soffice.bin window.
> 
> Yes, an `export QT_QPA_PLATFORM=xcb` only applies for the current terminal,
> i.e. processes started from there.
> 
> > Moreover, About Libreoffice shows "VCL:kf5(cairo+xcb)" with QT_QPA_PLATFORM
> > set but "VCL:kf5(cairo+wayland)" without.  I think this is what you suggest
> > I should see. 
> 
> Yes.
> 
> > I also see that the terminal window without QT_QPA_PLATFORM
> > gives error messages, 
> > 
> >     "qt.qpa.wayland: Wayland does not support QWindow::requestActivate()"
> >     "This plugin supports grabbing the mouse only for popup windows"
> 
> This warning is expected and unrelated.
> 
> > So, presumably, when I'm starting Writer from the launcher menu, it's simply
> > not seeing QT_QPA_PLATFORM that I set in the first terminal window.  
> 
> Yes, exactly.
>    
> > Another observation is that if I open Writer from the first terminal window,
> > and *leave it open* while I start Writer from the second terminal window,
> > then the second instance of Writer behaves as if QT_QPA_PLATFORM *is* set,
> > even though running env in the second terminal window shows that it isn't. 
> > May be we should expect that, but I thought it worth noting.
> 
> Yes, that's expected. LibreOffice doesn't start a new process/"session", but
> reuses the existing one if it's already running.
> 
> (In reply to p.wibberley from comment #9)
> > Oh, and "--nologo" doesn't seem to make any difference.
> 
> Thanks.
> 
> So to summarize: There's an "soffice.bin" window showing up temporarily when
> starting Writer, that then disappears and the actual Writer window shows up.
> This happens when either running LO as a native Wayland application
> (starting LO without QT_QPA_PLATFORM=xcb set) and when run with Qt's xcb
> platform, i.e. on XWayland (starting LO with QT_QPA_PLATFORM=xcb set).
> For the Wayland case, that "soffice.bin" window is shown much shorter than
> for the xcb case, but it's still shown.
> 
> Is that correct?
> 
> Could you please try whether you see the same when you start LO with
> environment variable SAL_USE_VCLPLUGIN=gtk3 to force the use of the
> so-called gtk3 VCL plugin? (Please double-check that "Help" -> "About
> LibreOffice" shows "VCL: gtk3" then.)

Hi Michael,   

Your summary is correct.  Yes, a "soffice.bin" opens and disappears, to be replaced by the Writer window.  This happens with X11 and Wayland, with or without QT_QPA_PLATFORM=xcb.  And, yes, for Wayland, the soffice.bin windows is visible for a much shorter time when QT_QPA_PLATFORM=xcb (as I think is also the case with X11 - I can recheck that later this afternoon).  

I've tried SAL_USE_VCLPLUGIN=gtk3.  I still get an initial window, but it is now labelled "Libreoffice 24.2", and is visible for about the same duration as with QT_QPA_PLATFORM=xcb. And I can confirm that do get "VCL: gtk3".  

I should say, where the window is visible only very briefly, I can't be sure whether the Writer window is a separate window that replaces the first window, or whether the title bar of the first window is simply re-labelled.  In contrast, with Wayland and no environment variables set, it's definitely the case that the first window closes, to be replaced by the second.  

Regards

P
Comment 13 Michael Weghorn 2024-05-06 06:10:13 UTC
Created attachment 193980 [details]
Screencast with gtk3 VCL plugin (without and with --nologo)
Comment 14 Michael Weghorn 2024-05-06 06:13:25 UTC
(In reply to p.wibberley from comment #12)
> I've tried SAL_USE_VCLPLUGIN=gtk3.  I still get an initial window, but it is
> now labelled "Libreoffice 24.2", and is visible for about the same duration
> as with QT_QPA_PLATFORM=xcb. And I can confirm that do get "VCL: gtk3".  

Is this also the case when starting with the "--nologo" argument mentioned earlier? I do see a temporary "LibreOffice" Window when starting without the "--nologo" argument. But I don't see that window when starting with "--nologo", which disables the splash screen.
If you look at that screencast: Do you see any other difference in behavior between your system and mine? And is the issue you describe visible in a screencast? (If so, attaching one here could help in understanding what's going on.)

> I should say, where the window is visible only very briefly, I can't be sure
> whether the Writer window is a separate window that replaces the first
> window, or whether the title bar of the first window is simply re-labelled. 
> In contrast, with Wayland and no environment variables set, it's definitely
> the case that the first window closes, to be replaced by the second.  

Is that also with SAL_USE_VCLPLUGIN=gtk3 (and verifying that  this is actually used in "Help" -> "About LibreOffice") or only with kf5 (in which case this could then be the aspect I mentioned in comment 1)?