<div dir="ltr"><div>I think the answer to this question can be found easier from <a href="https://www.freedesktop.org/wiki/">https://www.freedesktop.org/wiki/</a> or similar.</div><div> I don't see how this is gambas related question per se, but of course people here can help implement things in gambas, when you figure out what exactly to do.</div><div><br></div><div>Jussi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 2, 2020 at 9:12 PM herberth guzman <<a href="mailto:herberthguzman@gmail.com">herberthguzman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><div dir="auto">I honestly have no idea how to make a new system tray.</div><div dir="auto"><br></div><div dir="auto">I need help please.</div><div dir="auto"><br></div><div dir="auto">I need help creating a new system tray that supports 64-bit gb-qt5.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 1 abr. 2020 1:29 p. m., herberth guzman <<a href="mailto:herberthguzman@gmail.com" rel="noreferrer" target="_blank">herberthguzman@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>but there's no desktop! i mean we want to create a new systray area! how to do?<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
XDG_CURRENT_DESKTOP environment variable.<br></blockquote><div>set to a custom openbox in my case! no panel or systray area was starte i want to start by myselft!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 1 abr. 2020 a las 13:24, herberth guzman (<<a href="mailto:herberthguzman@gmail.com" rel="noreferrer noreferrer" target="_blank">herberthguzman@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 1 abr. 2020 a las 13:23, herberth guzman (<<a href="mailto:herberthguzman@gmail.com" rel="noreferrer noreferrer" target="_blank">herberthguzman@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>New Systray</div><div><span lang="en"><span title="">Fabien helped me with this example</span><br><span title="">but I'm still in trouble.</span></span></div><div><br></div>Private $hTrayIcons As New TrayIcon[]<br><br>Public Sub Form_Open()<br><br>  Dim a As String[]<br>  Dim s As String<br>  Dim sIcon As String<br>  Dim hTray As TrayIcon<br>  Dim vIconPixmap As Variant<br>  Dim i As Integer<br>  Dim ii As Integer<br>  Dim hbut As New Button(Me)<br>  DBus.Debug = True<br>  <br>   a = DBus["org.kde.StatusNotifierWatcher"]["/StatusNotifierWatcher", "org.kde.StatusNotifierWatcher"].RegisteredStatusNotifierItems<br>  <br>  For Each s In a<br><br>    'sIcon = DBus[File.Dir(s)]["/" & File.Name(s), "org.kde.StatusNotifierItem"].IconThemePath<br>    hTray = New TrayIcon<br>    hTray.Name = s <br>    hbut.Text = s<br>    'Print DBus[File.Dir(s)]["/" & File.Name(s), "org.kde.StatusNotifierItem"].OverlayIconName<br>    sIcon = DBus[File.Dir(s)]["/" & File.Name(s), "org.kde.StatusNotifierItem"].IconName<br>    hTray.IconName = sIcon<br>   <br>'    Print sIcon<br>'    Print hTray.IconName<br>    vIconPixmap = DBus[File.Dir(s)]["/" & File.Name(s), "org.kde.StatusNotifierItem"].IconPixmap<br>    If vIconPixmap Then<br>      Try hTray.Icon = GetPictureFromAVariant(vIconPixmap)<br>    Endif<br><br>    $hTrayIcons.Add(hTray)<br>     <br>     For ii = 0 To $hTrayIcons.Max<br>       hbut.H = 48<br>     hbut.w = 48<br>     hbut.Picture = $hTrayIcons[i].GetIcon(32)<br>     <br>     Next<br>'    Paint.DrawPicture($hTrayIcons[i].GetIcon(32), i * 32, 5)<br>  <br>     <br>  Next<br><br>  DrawingArea1.Refresh<br><br>  'Me.Picture = hDBusPixmap.GetPicture()<br>End<br><br>Private Sub GetPictureFromAVariant(hValue As Variant[]) As Picture<br><br>  Dim H, W As Integer<br>  Dim hData As Byte[]<br>  Dim hFile As File<br>  Dim hPic As Image<br><br>  W = hValue[0][0]<br>  H = hValue[0][1]<br>  hData = hValue[0][2]<br><br>  hPic = New Image(W, H, Color.Transparent)<br>  hPic.Format = "ARGB"<br>  hFile = Memory hPic.Data For Write<br>  hData.Write(hFile)<br>  hFile.Close<br>  Return hPic.picture<br><br>End<br><br>Public Sub DrawingArea1_Draw()<br><br>  Dim i As Integer<br><br>  For i = 0 To $hTrayIcons.Max<br>    Paint.DrawPicture($hTrayIcons[i].GetIcon(32), i * 32, 5)<br>  Next<br><br><div>End</div><div><br></div><div>[System]<br>Gambas=3.14.90 0714bf7 (master)<br>OperatingSystem=Linux<br>Kernel=5.4.0-18-generic<br>Architecture=x86_64<br>Distribution=Ubuntu Focal Fossa (development branch)<br>Desktop=INNOVA<br>Theme=Fusion<br>Language=es_GT.UTF-8<br>Memory=3735M<br><br>[Libraries]<br>Cairo=libcairo.so.2.11600.0<br>Curl=libcurl.so.4.6.0<br>DBus=libdbus-1.so.3.19.11<br>GStreamer=libgstreamer-1.0.so.0.1602.0<br>GTK+2=libgtk-x11-2.0.so.0.2400.32<br>GTK+3=libgtk-3.so.0.2404.10<br>OpenGL=libGL.so.1.7.0<br>Poppler=libpoppler.so.95.0.0<br>Poppler=libpoppler.so.97.0.0<br>QT5=libQt5Core.so.5.12.5<br>SDL=libSDL-1.2.so.0.11.4<br>SQLite=libsqlite3.so.0.8.6<br><br>[Environment]<br>CLUTTER_IM_MODULE=ibus<br>DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus<br>DESKTOP_SESSION=Innova<br>DISPLAY=:0<br>GB_GUI=gb.qt5<br>GDMSESSION=Innova<br>GNOME_DESKTOP_SESSION_ID=this-is-deprecated<br>GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1<br>GTK_IM_MODULE=ibus<br>GTK_MODULES=gail:atk-bridge<br>HOME=<home><br>LANG=es_GT.UTF-8<br>LANGUAGE=es_GT.UTF-8<br>LOGNAME=<user><br>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin<br>PWD=<home><br>QT4_IM_MODULE=ibus<br>QT_ACCESSIBILITY=1<br>QT_IM_MODULE=ibus<br>QT_LOGGING_RULES=*.debug=false<br>SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/1740,unix/<hostname>:/tmp/.ICE-unix/1740<br>SHELL=/bin/bash<br>SHLVL=1<br>SSH_AGENT_PID=1692<br>SSH_AUTH_SOCK=/run/user/1000/keyring/ssh<br>TZ=:/etc/localtime<br>USER=<user><br>USERNAME=<user><br>WINDOWPATH=2<br>XAUTHORITY=/run/user/1000/gdm/Xauthority<br>XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg/xdg-Innova:/etc/xdg<br>XDG_CONFIG_HOME=<home>/.config<br>XDG_CURRENT_DESKTOP=Innova<br>XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/<br>XDG_MENU_PREFIX=innova-<br>XDG_RUNTIME_DIR=/run/user/1000<br>XDG_SEAT=seat0<br>XDG_SESSION_CLASS=user<br>XDG_SESSION_DESKTOP=Innova<br>XDG_SESSION_ID=10<br>XDG_SESSION_TYPE=x11<br>XDG_VTNR=2<br>XMODIFIERS=@im=ibus</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 1 abr. 2020 a las 13:21, herberth guzman (<<a href="mailto:herberthguzman@gmail.com" rel="noreferrer noreferrer" target="_blank">herberthguzman@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>X11 Classic</div><div>gb-qt5 BAD<br></div><div>gb-qt4 OK</div><div><br></div><div>Public Sub _new()<br><br>Shell "vlc"<br>Shell "nm-applet"<br><br>End<br><br>Public Sub Form_Open()<br><br>  X11Systray.Show(dwgSystemTray.Handle)<br>  <br>End<br><br>Static Public Sub X11Systray_Arrange()<br><br>  FMain.ArrangeTray<br>  <br>End<br><br>Public Sub ArrangeTray()<br><br>  Dim I As Integer<br>  Dim X, Y, H As Integer<br>  <br>  Debug<br>  X = 2<br>  Y = 2<br>  For I = 0 To X11Systray.Count - 1<br>    With X11Systray[I]<br>      Debug I;; .IconW;; .IconH<br>      If (X + .IconW) >= (Me.ClientW - 2) Then<br>        X = 2<br>        Y += H + 2<br>        H = 0<br>      Endif<br>      .Move(X, Y, .IconW, .IconH)<br>      H = Max(H, .IconH)<br>      X += .IconW + 2<br>    End With<br>  Next<br>  <br>End<br><br>Public Sub Form_Resize()<br> <br>  ArrangeTray<br><br>End<br></div><div><br></div><div><br></div><div><br></div><div><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 1 abr. 2020 a las 13:13, Benoît Minisini (<<a href="mailto:g4mba5@gmail.com" rel="noreferrer noreferrer" target="_blank">g4mba5@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le 01/04/2020 à 21:05, herberth guzman a écrit :<br>
> <br>
>>>What does not work exactly?<br>
> <br>
> I have a classic system tray (x11)<br>
> with ubuntu 32 bits and gb-qt4 it works fine for me<br>
> <br>
> with ubuntu 64 bit and gb-qt5 it doesn't work<br>
> does not show anything in the system tray<br>
> <br>
> Error:<br>
> qt.qpa.xcb: Unhandled client message: "_NET_WM_DESKTOP"<br>
> FMain.ArrangeTray.28:<br>
> <br>
<br>
If you don't give more details, I can't help. Which system? Which <br>
desktop? How do you implement the system tray? Did you implement X11 <br>
protocol, DBus protocol, both? And so on...<br>
<br>
-- <br>
Benoît Minisini<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer noreferrer noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div>