Skip to content

Commit 9611ce1

Browse files
author
sfnemis
committed
Fix popup disappearing with Dash to Panel auto-hide
- Open indicator menu invisibly when showing popup to signal panel extensions - Close indicator menu when hiding popup - Remove redundant try-catch wrappers in disable() Fixes #1
1 parent 68d0baf commit 9611ce1

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

clipmaster@gnome.extension/extension.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,11 @@ export default class ClipMasterExtension extends Extension {
9494

9595
// Remove from chrome before destroying
9696
if (this._popupAddedToChrome) {
97-
try {
98-
Main.layoutManager.removeChrome(this._popup);
99-
} catch (e) {
100-
// Ignore removal errors during disable
101-
}
97+
Main.layoutManager.removeChrome(this._popup);
10298
this._popupAddedToChrome = false;
10399
}
104100

105-
try {
106-
this._popup.destroy();
107-
} catch (e) {
108-
// Ignore destruction errors
109-
}
101+
this._popup.destroy();
110102
this._popup = null;
111103
}
112104

@@ -281,6 +273,11 @@ export default class ClipMasterExtension extends Extension {
281273
this._popup._isShowing = false;
282274
this._popup.hide();
283275

276+
// Close indicator menu to signal Dash to Panel that menu is closed
277+
if (this._indicator?.menu) {
278+
this._indicator.menu.close();
279+
}
280+
284281
// Remove from chrome when hidden to prevent any input interference
285282
if (this._popupAddedToChrome) {
286283
Main.layoutManager.removeChrome(this._popup);

clipmaster@gnome.extension/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"uuid": "clipmaster@gnome.extension",
33
"name": "ClipMaster",
44
"description": "ClipMaster is a clipboard manager with history, image support, favorites, and optional themes. Follows system dark/light preference by default.",
5-
"version": 8,
6-
"version-name": "1.3",
5+
"version": 9,
6+
"version-name": "1.3.1",
77
"shell-version": [
88
"45",
99
"46",

clipmaster@gnome.extension/src/UI/Indicator.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ export const ClipMasterIndicator = GObject.registerClass(
3838
const button = event.get_button();
3939

4040
if (button === 1) {
41+
// Signal to panel extensions (like Dash to Panel) that a menu is open
42+
// This prevents auto-hide from triggering when showing our custom popup
43+
this.menu.open();
44+
this.menu.actor.visible = false;
4145
this._extension.togglePopup();
4246
return Clutter.EVENT_STOP;
4347
} else if (button === 3) {

0 commit comments

Comments
 (0)