Fix issue with tracking of async requests

This commit is contained in:
wheaney 2024-07-25 13:27:06 -07:00
parent d1c5e9fc4d
commit f8886970f5
3 changed files with 13 additions and 5 deletions

View File

@ -73,8 +73,11 @@ pushd gnome/src
GNOME_MANIFEST_LINE=$(find -L . -type f ! -name "*.compiled" -exec sha256sum {} \; | sort | sha256sum | sed 's/ .*//')
popd
FLATPAK_BUILD_ARTIFACT=ui/out/com.xronlinux.BreezyDesktop-$ARCH.flatpak
if [ ! -e "$FLATPAK_BUILD_ARTIFACT" ] || [ "$1" == "--rebuild-flatpak" ]; then
ui/bin/package $ARCH
cp ui/out/com.xronlinux.BreezyDesktop-$ARCH.flatpak $PACKAGE_DIR/com.xronlinux.BreezyDesktop.flatpak
fi
cp $FLATPAK_BUILD_ARTIFACT $PACKAGE_DIR/com.xronlinux.BreezyDesktop.flatpak
# create manifest file for verifying installed file checksums against the originally packaged versions
# include any file that doesn't get modified during setup (e.g. vkBasalt.json files)

View File

@ -360,6 +360,7 @@ export const MonitorManager = GObject.registerClass({
}
this._asyncRequestsInFlight++;
getMonitorConfig(this._displayConfigProxy, ((result, error) => {
this._asyncRequestsInFlight--;
if (error) {
Globals.logger.log(error);
return;
@ -384,7 +385,7 @@ export const MonitorManager = GObject.registerClass({
}
this._monitorProperties = monitorProperties;
if (!!this._changeHookFn) {
if (--this._asyncRequestsInFlight === 0) {
if (this._asyncRequestsInFlight === 0) {
this._changeHookFn();
} else {
Globals.logger.log_debug(`MonitorManager _on_monitors_change: ${this._asyncRequestsInFlight} requests still pending, skipping change hook`);

View File

@ -21,11 +21,15 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
TMP_DIR=$(mktemp -d --tmpdir=$SCRIPT_DIR/.. -t .breezy-ui-flatpak-XXXXXXXXXX)
OUT_DIR=$SCRIPT_DIR/../out
rm -rf $OUT_DIR
mkdir -p $OUT_DIR
BUILD_ARTIFACT=$OUT_DIR/com.xronlinux.BreezyDesktop-$ARCH.flatpak
if [ -e "$BUILD_ARTIFACT" ]; then
rm $BUILD_ARTIFACT
fi
flatpak-builder --arch $ARCH --disable-rofiles-fuse --disable-cache --force-clean --delete-build-dirs --user $TMP_DIR/build $SCRIPT_DIR/../com.xronlinux.BreezyDesktop.json
flatpak build-export --arch $ARCH $TMP_DIR/export $TMP_DIR/build
flatpak build-bundle --arch $ARCH $TMP_DIR/export $OUT_DIR/com.xronlinux.BreezyDesktop-$ARCH.flatpak com.xronlinux.BreezyDesktop --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
flatpak build-bundle --arch $ARCH $TMP_DIR/export $BUILD_ARTIFACT com.xronlinux.BreezyDesktop --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
rm -rf "$TMP_DIR"