quelea-projection / Quelea

Open source projection software for churches.
https://quelea.org
GNU General Public License v3.0
156 stars 145 forks source link

Go live of presentation when screen ist black results in weired black state #91

Closed FelixHeppner closed 5 years ago

FelixHeppner commented 5 years ago

In a schedule with one song and one pptx presentation in this order:

Result: Screen is still black but the toolbar button shows "not black". I have to hit F6 twice to get the pptx shown. This is especially tricky when the first pptx slide is black.

I expect the black state to stay the same when going live with the next item just like it works with multiple songs.

The reason for this behaviour might be in Presentation Panel line 109-111

if (lp.getBlacked() && !PowerPointHandler.screenStatus().equals("3")) { lp.setBlacked(false); }

When I remove these lines the behaviour is okay in the cases I tested. But since I don not really understand the reason for these lines the removal might break something else.

berry120 commented 5 years ago

Thanks for the report! Off the top of my head I don't remember writing those lines (that doesn't mean much these days though) so I'll have to take a closer look.

@ArvidNy - Is this something you recognise at all?

ArvidNy commented 5 years ago

Yes, most PowerPoint code is my work and that looks like my buggy attempt at synchronizing the PowerPoint status with Quelea. Since you can control PowerPoint from outside of Quelea, you might end up with the opposite problem without those lines (PowerPoint isn't black but the Quelea button is selected). In other words, if you skip to a new slide in PowerPoint, the black screen is automatically removed to show the slide, but Quelea will still believe that it's black unless that check is made. My guess is that Quelea calls the status from PowerPoint before it's fully loaded and that returns the wrong status which causes this bug. Perhaps we should be able to call this only when there's a slide change within an item and not when a new item goes live.

By the way, which OS are you using? There's always the possibility that be either the AppleScript or the VBS that gives the wrong response too.

FelixHeppner commented 5 years ago

Thanks for the fast response! OS is Windows 7. Version is 2018.1 or head of master. We do not use "native" Powerpoint to show the presentation but queleas Presentation reader. I just checked with 2018.1 under Linux (Ubuntu bionic) the behaviour is the same. Where does the "3" come from? I tried to understand what is going on there but "3"?

ArvidNy commented 5 years ago

Oh, that's probably the problem here; I've forgotten to add a check if the option to use PowerPoint is enabled or not... Sorry about that! I'll add that in and if you want you could give the CI release a try in an hour or so. Unless someone would report any issues with this code using PowerPoint as well, I think that's the only change we would need to make.

The "3" is the response you get from the screenStatus.vbs file. The VBA method pptAppl.ActivePresentation.View.State in that file returns "3" for black screen, see here: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppslideshowstate

FelixHeppner commented 5 years ago

I confirm the bug is fixed for "not powerpoint" use case in master. World class reaction time! Thank you.

ArvidNy commented 5 years ago

Great, thanks for confirming!

berry120 commented 5 years ago

Thanks all!