Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
Merge pull request #7 from Vasak-OS/fix/application_random_close
Browse files Browse the repository at this point in the history
fix: Se chequea ventana al cerrar
  • Loading branch information
JoaquinDecima authored Mar 11, 2024
2 parents 4e1470b + 937bca4 commit 80c0cc6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/x11/X11WindowStatusManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ def __init__(self, window):
# Connect the screen to the default event loop
self.screen.connect("window-opened", self.windowOpened)
self.screen.connect('window-closed', self.windowClosed)
self.emitSignal()

def windowOpened(self, screen, window):
windowType = window.get_window_type()
if windowType == Wnck.WindowType.NORMAL:
self.all_windows.append(window)
self.emitSignal()

self.emitSignal()

def windowClosed(self, screen, window):
self.all_windows.remove(window)
self.emitSignal()
if window in self.all_windows:
self.all_windows.remove(window)
self.emitSignal()

def emitSignal(self):
windows = []
Expand Down

0 comments on commit 80c0cc6

Please sign in to comment.