screenoverlay 0.6.1__tar.gz → 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: screenoverlay
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Cross-platform screen overlay with blur, black, white, and custom modes
5
5
  Home-page: https://github.com/pekay-ai/screenoverlay
6
- Author: Pekay
6
+ Author: ScreenStop
7
7
  Author-email: ppnicky@gmail.com
8
8
  Classifier: Development Status :: 4 - Beta
9
9
  Classifier: Intended Audience :: Developers
@@ -5,7 +5,7 @@ Provides blur, black, white, and custom color overlays with minimal latency
5
5
 
6
6
  from .overlay import NativeBlurOverlay as Overlay
7
7
 
8
- __version__ = '0.6.0'
9
- __author__ = 'Pekay'
8
+ __version__ = '0.6.3'
9
+ __author__ = 'ScreenStop'
10
10
  __all__ = ['Overlay']
11
11
 
@@ -79,7 +79,7 @@ class NativeBlurOverlay:
79
79
 
80
80
  while True:
81
81
  overlay.show() # Show overlay (instant)
82
- time.sleep(2)
82
+ time.sleep(2)
83
83
  overlay.hide() # Hide overlay (instant)
84
84
  overlay.update() # Keep overlay responsive (call regularly!)
85
85
 
@@ -99,15 +99,12 @@ class NativeBlurOverlay:
99
99
 
100
100
  def show(self):
101
101
  """Show the overlay (instant, <1ms)"""
102
- import traceback
103
- print(f"\n🔴 OVERLAY.SHOW() CALLED! Stack trace:")
104
- traceback.print_stack()
105
-
106
102
  if self.root is None:
107
103
  # Auto-start if not started yet
108
104
  self.start()
109
105
 
110
106
  if not self._is_visible:
107
+ print(f"\n🔴 SHOWING overlay windows...")
111
108
  for win in self.windows:
112
109
  try:
113
110
  win.deiconify()
@@ -119,53 +116,22 @@ class NativeBlurOverlay:
119
116
  print(f"✅ OVERLAY IS NOW VISIBLE\n")
120
117
 
121
118
  def hide(self):
122
- """Hide the overlay by DESTROYING and RECREATING it (prevents ghost windows/CPU leaks)"""
123
- import traceback
124
- print(f"\n⚪ OVERLAY.HIDE() CALLED! Stack trace:")
125
- traceback.print_stack()
126
-
119
+ """Hide the overlay using withdraw() (lightweight, fast, no resource leaks)"""
127
120
  if self.root is None:
128
121
  return # Not started yet
129
122
 
130
123
  if self._is_visible:
131
- # COMPLETE DESTRUCTION - no lingering windows or events!
132
- print(f"🗑️ DESTROYING overlay completely...")
133
- try:
134
- # Just destroy root - it will destroy all child windows automatically
135
- if self.root:
136
- try:
137
- self.root.destroy()
138
- except Exception as e:
139
- print(f"Warning: destroy() failed: {e} (might already be destroyed)")
140
- except Exception as e:
141
- print(f"Warning: Failed to destroy overlay: {e}")
124
+ # LIGHTWEIGHT HIDE - just withdraw windows (don't destroy/recreate)
125
+ print(f"🫥 WITHDRAWING overlay windows (lightweight hide)...")
126
+ for win in self.windows:
127
+ try:
128
+ win.attributes('-topmost', False) # Remove topmost before hiding
129
+ win.withdraw()
130
+ except Exception as e:
131
+ print(f"Warning: Failed to withdraw window: {e}")
142
132
 
143
- self.root = None
144
- self.windows = []
145
133
  self._is_visible = False
146
- print(f"✅ OVERLAY DESTROYED\n")
147
-
148
- # SAFETY CHECK: Verify system is clean before recreating
149
- print(f"🔍 SAFETY CHECK: Verifying clean state...")
150
- if self.root is not None:
151
- print(f"⚠️ WARNING: self.root is not None after destroy! Force clearing...")
152
- self.root = None
153
- if len(self.windows) > 0:
154
- print(f"⚠️ WARNING: self.windows has {len(self.windows)} entries after destroy! Force clearing...")
155
- self.windows = []
156
- if self._is_visible:
157
- print(f"⚠️ WARNING: _is_visible is True after destroy! Force clearing...")
158
- self._is_visible = False
159
-
160
- # Small delay to let Tkinter/macOS fully cleanup
161
- import time
162
- time.sleep(0.01) # 10ms delay for cleanup
163
- print(f"✅ SYSTEM CLEAN\n")
164
-
165
- # RECREATE FRESH for next show()
166
- print(f"♻️ RECREATING fresh overlay...")
167
- self.start()
168
- print(f"✅ FRESH OVERLAY READY (hidden)\n")
134
+ print(f"✅ OVERLAY HIDDEN (windows withdrawn)\n")
169
135
 
170
136
  def update(self):
171
137
  """
@@ -254,6 +220,16 @@ class NativeBlurOverlay:
254
220
 
255
221
  # Create primary root window
256
222
  self.root = tk.Tk()
223
+
224
+ # Hide from dock immediately after creating Tk window
225
+ # This prevents dock icon from appearing even though we create GUI windows
226
+ try:
227
+ import AppKit
228
+ AppKit.NSApp.setActivationPolicy_(AppKit.NSApplicationActivationPolicyProhibited)
229
+ print("✅ Screenoverlay: Dock icon hidden")
230
+ except Exception as e:
231
+ print(f"⚠️ Screenoverlay: Could not hide dock icon: {e}")
232
+
257
233
  self.root.overrideredirect(True)
258
234
  self.root.attributes('-topmost', True)
259
235
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: screenoverlay
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Cross-platform screen overlay with blur, black, white, and custom modes
5
5
  Home-page: https://github.com/pekay-ai/screenoverlay
6
- Author: Pekay
6
+ Author: ScreenStop
7
7
  Author-email: ppnicky@gmail.com
8
8
  Classifier: Development Status :: 4 - Beta
9
9
  Classifier: Intended Audience :: Developers
@@ -5,8 +5,8 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="screenoverlay",
8
- version="0.6.1",
9
- author="Pekay",
8
+ version="0.6.3",
9
+ author="ScreenStop",
10
10
  author_email="ppnicky@gmail.com",
11
11
  description="Cross-platform screen overlay with blur, black, white, and custom modes",
12
12
  long_description=long_description,
File without changes
File without changes
File without changes