1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
Add pseudo transparency to the tray icon
--- src/GMTrayIcon.cpp.orig 2020-12-27 21:40:54 UTC
+++ src/GMTrayIcon.cpp
@@ -81,17 +81,17 @@ void GMTrayIcon::updateIcon() {
/// Update
if (size<=16) {
- icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,opaque ? IMAGE_OPAQUE : 0);
+ icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,IMAGE_ALPHAGUESS);
icon->setVisual(getVisual());
if (size!=16) icon->scale(size,size,FOX_SCALE_BEST);
}
else {
- icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,opaque ? IMAGE_OPAQUE : 0);
+ icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,IMAGE_ALPHAGUESS);
icon->setVisual(getVisual());
if (size!=32) icon->scale(size,size,FOX_SCALE_BEST);
}
- icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color);
+ //icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color);
icon->create();
// Mark Dirty
@@ -230,14 +230,9 @@ void GMTrayIcon::dock() {
void GMTrayIcon::dock() {
if (findSystemTray()){
- FXuint trayid = getTrayVisual();
- if (trayid) {
- if (trayid!=XVisualIDFromVisual((Visual*)getVisual()->getVisual()))
- opaque=true;
- else
- opaque=false;
- }
+ opaque=false;
+
if (!opaque) {
/// Don't draw the background
XSetWindowAttributes sattr;
@@ -276,16 +271,16 @@ long GMTrayIcon::onConfigure(FXObject*,FXSelector,void
if (icon==nullptr) {
if (size<=16) {
- icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,opaque ? IMAGE_OPAQUE : 0);
+ icon = new FXPNGIcon(getApp(),gogglesmm_16_png,0,IMAGE_ALPHAGUESS);
icon->setVisual(getVisual());
if (size!=16) icon->scale(size,size,FOX_SCALE_BEST);
}
else {
- icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,opaque ? IMAGE_OPAQUE : 0);
+ icon = new FXPNGIcon(getApp(),gogglesmm_32_png,0,IMAGE_ALPHAGUESS);
icon->setVisual(getVisual());
if (size!=32) icon->scale(size,size,FOX_SCALE_BEST);
}
- icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color);
+ //icon->blend(GMPlayerManager::instance()->getPreferences().gui_tray_color);
icon->create();
}
return 1;
|