Skip to content

Commit

Permalink
slideshow: when presenter window is resized, slide is not
Browse files Browse the repository at this point in the history
Now that the presenter window is an iframe, its no more able to trigger the
resize event so we need to attach it to the main window.

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I208aa90fd52bfa956bd30eebd6e8cd03538776a1
  • Loading branch information
mcecchetti committed Dec 17, 2024
1 parent 296d48f commit 02a75e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions browser/src/slideshow/SlideShowPresenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,7 @@ class SlideShowPresenter {
);
this._slideShowCanvas.focus();

this._slideShowWindowProxy.addEventListener(
'resize',
this.onSlideWindowResize.bind(this),
);
window.addEventListener('resize', this.onSlideWindowResize.bind(this));
this._getProxyDocumentNode().addEventListener(
'keydown',
this._onKeyDownHandler,
Expand Down Expand Up @@ -534,6 +531,7 @@ class SlideShowPresenter {
this._slideShowCanvas = null;
this._presenterContainer = null;
this._slideShowWindowProxy = null;
window.removeEventListener('resize', this.onSlideWindowResize.bind(this));
window.removeEventListener(
'beforeunload',
this.slideshowWindowCleanUp.bind(this),
Expand Down

0 comments on commit 02a75e3

Please sign in to comment.