From ae1f3d83cc13aa51deb9015685269cf13d3e9d68 Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Thu, 19 Dec 2024 17:33:45 +0100 Subject: [PATCH] slideshow: followup: exit from notes view before starting This is a follow up since previous patch has a problem when presenter console is started in Firefox when Impress is in notes view mode. Oddly, it seems that presentation information are requested but the reply with the info never reaches CanvasTileLayer._onMessage. Anyway I can see that the reply is sent by the core. Since I'm not able to understand the root cause, I implemented a simple workaround by delay the presenter console start by 500ms. In order to be safer I decided to apply the same delay also when we present without the console. Signed-off-by: Marco Cecchetti Change-Id: I941419b3d33095608973af18aab9df2b767a02f4 --- browser/src/slideshow/PresenterConsole.js | 2 +- browser/src/slideshow/SlideShowPresenter.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/browser/src/slideshow/PresenterConsole.js b/browser/src/slideshow/PresenterConsole.js index 688c900fdc60..1e366eaac015 100644 --- a/browser/src/slideshow/PresenterConsole.js +++ b/browser/src/slideshow/PresenterConsole.js @@ -193,7 +193,7 @@ class PresenterConsole { if (this._waitForExitingNotesMode && e.mode === 0) { this._waitForExitingNotesMode = false; this._map.off('impressmodechanged', this._onImpressModeChanged, this); - this._onPresentInConsole(); + setTimeout(this._onPresentInConsole.bind(this), 500); } } diff --git a/browser/src/slideshow/SlideShowPresenter.ts b/browser/src/slideshow/SlideShowPresenter.ts index 0429acfae93c..64e880fa3ab8 100644 --- a/browser/src/slideshow/SlideShowPresenter.ts +++ b/browser/src/slideshow/SlideShowPresenter.ts @@ -547,7 +547,8 @@ class SlideShowPresenter { const startSlide = { startSlideNumber: this._startSlide, }; - inWindow ? this._onStartInWindow(startSlide) : this._onStart(startSlide); + const startSlideshow = inWindow ? this._onStartInWindow : this._onStart; + setTimeout(startSlideshow.bind(this, startSlide), 500); } }