Skip to content

Commit

Permalink
fix windows sometimes incorrectly minimized on regeometrization
Browse files Browse the repository at this point in the history
  • Loading branch information
nclarius committed May 8, 2022
1 parent 9cf0bad commit 2f3de1c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
11 changes: 0 additions & 11 deletions contents/code/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ function onAdded(client) {
}

// trigger minimize and restore when window geometry changes
var block = false;
function onAddedOnRegeometrized(client) {
[client.clientGeometryChanged,
client.frameGeometryChanged,
Expand All @@ -152,21 +151,12 @@ function onAddedOnRegeometrized(client) {
client.desktopChanged,
client.activitiesChanged].
forEach(signal => signal.connect(onRegeometrized));
client.clientStartUserMovedResized.connect(client => {
// block = true;
});
client.clientFinishUserMovedResized.connect(client => {
block = false;
onRegeometrized(client);
});
}
function onRegeometrized(client) {
if (!client) return;
if (block) return;
debug("====================")
debug("regeometrized", caption(client));
fulldebug(properties(client));
removeMinimized(client);
minimizeOverlapping(client);
restoreMinimized(client);
}
Expand Down Expand Up @@ -225,7 +215,6 @@ function onRemoved(client) {
// minimize all windows overlapped by active window
function minimizeOverlapping(active) {
if (!active) active = workspace.activeClient;
debug(active.caption, active.resourceName, active.resourceName == "krunner", ["plasmashell", "krunner"].includes(String(active.resourceName)), config.ignoreShell && ["plasmashell", "krunner"].includes(String(active.resourceName)));
if (!active || ignoreClient(active) || ignoreFront(active)) return;
debug("- apply minimize for", caption(active));
fulldebug(properties(active));
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion metadata.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Comment[nl]=Voorkomt vensteroverlapping door ze te minimaliseren en herstellen o
Icon=preferences-system-windows

X-KDE-PluginInfo-Name=floatingtiles
X-KDE-PluginInfo-Version=6.1
X-KDE-PluginInfo-Version=6.2
X-KDE-PluginInfo-Author=Natalie Clarius
X-KDE-PluginInfo-Email[email protected]
X-KDE-PluginInfo-License=GPLv3.0
Expand Down
16 changes: 12 additions & 4 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ echo "$name"' v'"$version"
heading_md=$([[ $version == *.0 ]] && echo '#' || echo '##')
caption_md="${heading_md}"' v'"${version}"
changes_md=$(cat CHANGELOG.txt)
echo "$caption_md"$'\n'"$changes_md"$'\n\n'"$(cat CHANGELOG.md)" > "CHANGELOG.md"
echo 'generated changelog markdown'
changelog_md="$caption_md"$'\n'"$changes_md"$'\n\n'"$(cat CHANGELOG.md)"
if ! grep -Fxq "$changelog_md" CHANGELOG.md
then
echo "$changelog_md" > "CHANGELOG.md"
echo 'generated changelog markdown'
fi

# generate changelog in bbcode format
heading_bb=$([[ $version == *.0 ]] && echo "h1" || echo "h2")
caption_bb='['"$heading_bb"']v'"$version"'[/'"$heading_bb"']'
changes_bb='[list]\n'"$(cat CHANGELOG.txt | sed 's/- /[*] /g')"$'\n[/list]'
echo "$caption_bb"$'\n'"$changes_bb"$'\n\n'"$(cat CHANGELOG.bbcode)" > "CHANGELOG.bbcode"
echo 'generated changelog bbcode'
changelog_bb="$caption_bb"$'\n'"$changes_bb"$'\n\n'"$(cat CHANGELOG.bbcode)"
if ! grep -Fxq "$changelog_bb" CHANGELOG.bbcode
then
echo "$changelog_bb" > "CHANGELOG.bbcode"
echo 'generated changelog bbcode'
fi

# generate kwinscript package
find . -name "*.kwinscript" -type f -delete
Expand Down

0 comments on commit 2f3de1c

Please sign in to comment.