Skip to content

Commit

Permalink
top level window fix
Browse files Browse the repository at this point in the history
Signed-off-by: David Anyatonwu <[email protected]>
  • Loading branch information
onyedikachi-david committed Aug 26, 2024
1 parent e13d4b6 commit 9ba6bd9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y xvfb pulseaudio ffmpeg imagemagick xdotool x11-xserver-utils python3-gi python3-gi-cairo gir1.2-gtk-3.0
sudo apt-get install -y xvfb pulseaudio ffmpeg imagemagick xdotool x11-xserver-utils xterm
Xvfb :99 -ac -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
sleep 2
Expand Down Expand Up @@ -229,10 +229,15 @@ jobs:
echo "Health check passed"
exit 0
fi
# Debug information
echo "Iteration $i: Current window list"
DISPLAY=:99 xwininfo -root -children
echo "Current processes:"
ps aux | grep -E 'Xvfb|xterm|screenpipe'
done
echo "Health check failed after 4 minutes"
echo "Metacity error log:"
cat metacity.err
echo "Xvfb log:"
cat /var/log/Xvfb.0.log
exit 1
- name: Run CLI and check health (Windows)
Expand Down
19 changes: 2 additions & 17 deletions scripts/launch_test_window.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

# Check if running on Ubuntu
if [[ "$(uname)" == "Linux" ]]; then
# Create a simple GTK window
python3 - << END
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GLib
def main():
window = Gtk.Window(title="Test Window")
window.set_default_size(400, 300)
window.connect("destroy", Gtk.main_quit)
window.show_all()
GLib.timeout_add_seconds(300, Gtk.main_quit) # Exit after 5 minutes
Gtk.main()
if __name__ == "__main__":
main()
END
# Launch xterm with a visible window
xterm -geometry 80x24+100+100 -e "echo 'Test Window'; sleep 300" &
fi
2 changes: 1 addition & 1 deletion scripts/simulate_screen_activity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [[ "$(uname)" == "Linux" ]]; then
# Function to simulate mouse movement
simulate_mouse() {
for i in {1..10}; do
xdotool mousemove $((RANDOM % 400)) $((RANDOM % 300))
xdotool mousemove $((100 + RANDOM % 300)) $((100 + RANDOM % 200))
sleep 0.5
done
}
Expand Down

0 comments on commit 9ba6bd9

Please sign in to comment.