Skip to content

Commit

Permalink
close #1073
Browse files Browse the repository at this point in the history
  • Loading branch information
jelveh committed Dec 20, 2024
1 parent 9c86614 commit b1833ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/src/UI/UIWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,7 @@ async function UIWindow(options) {
start: function(){
$(el_window_app_iframe).css('pointer-events', 'none');
$('.window').css('pointer-events', 'none');
window.a_window_sidebar_is_resizing = true;
},
stop: function () {
$(el_window_app_iframe).css('pointer-events', 'all');
Expand All @@ -2017,6 +2018,7 @@ async function UIWindow(options) {
puter.kv.set({key: "window_sidebar_width", value: new_width});
// save new width locally, to window object
window.window_sidebar_width = new_width;
window.a_window_sidebar_is_resizing = false;
}
})

Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ window.desktop_width = window.innerWidth;
// {id: {left: 0, top: 0}}
window.original_window_position = {};
window.a_window_is_resizing = false;
window.a_window_sidebar_is_resizing = false;

// recalculate desktop height and width on window resize
$( window ).on( "resize", function() {
if(window.is_fullpage_mode) return;
if(window.a_window_is_resizing) return;
if(window.a_window_sidebar_is_resizing) return;

const new_desktop_height = window.innerHeight - window.toolbar_height - window.taskbar_height - 6;
const new_desktop_width = window.innerWidth;
Expand Down

0 comments on commit b1833ce

Please sign in to comment.