Skip to content

Commit

Permalink
slideshow: followup: exit from notes view before starting
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I941419b3d33095608973af18aab9df2b767a02f4
  • Loading branch information
mcecchetti committed Dec 20, 2024
1 parent e116ee8 commit ae1f3d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion browser/src/slideshow/PresenterConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
3 changes: 2 additions & 1 deletion browser/src/slideshow/SlideShowPresenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit ae1f3d8

Please sign in to comment.