mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[client] x11: Add inline icon
Many X11 window managers will present an application on their taskbar as a combination of the application name and an icon imagery pulled from the X-Property _NET_WM_ICON. Applications built under frameworks such as Qt or GTK have this property populated by the framework. This commit adds the Atom _NET_WM_ICON and populates it with a 64x64 icon of Looking Glass.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
DEF_ATOM(_NET_REQUEST_FRAME_EXTENTS, True) \
|
||||
DEF_ATOM(_NET_FRAME_EXTENTS, True) \
|
||||
DEF_ATOM(_NET_WM_BYPASS_COMPOSITOR, False) \
|
||||
DEF_ATOM(_NET_WM_ICON, True) \
|
||||
DEF_ATOM(_NET_WM_STATE, True) \
|
||||
DEF_ATOM(_NET_WM_STATE_FULLSCREEN, True) \
|
||||
DEF_ATOM(_NET_WM_STATE_FOCUSED, True) \
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "x11.h"
|
||||
#include "atoms.h"
|
||||
#include "clipboard.h"
|
||||
#include "resources/icondata.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@@ -562,6 +563,17 @@ static bool x11Init(const LG_DSInitParams params)
|
||||
1
|
||||
);
|
||||
|
||||
XChangeProperty(
|
||||
x11.display,
|
||||
x11.window,
|
||||
x11atoms._NET_WM_ICON,
|
||||
XA_CARDINAL,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)icondata,
|
||||
sizeof(icondata) / sizeof(icondata[0])
|
||||
);
|
||||
|
||||
/* create the blank cursor */
|
||||
{
|
||||
static char data[] = { 0x00 };
|
||||
|
Reference in New Issue
Block a user