diff options
| author | Pierre Ossman <ossman@cendio.se> | 2015-04-20 12:02:10 +0000 |
|---|---|---|
| committer | Pierre Ossman <ossman@cendio.se> | 2015-04-20 12:02:10 +0000 |
| commit | e0894bf0e1483d3d254f12e6419723fa264d6440 (patch) | |
| tree | a217f21e0e03c0711580eef3270d054a8bafd5c6 /src | |
| parent | 07c952608503dabfe0e543304b8eaf806f1f8622 (diff) | |
Make sure we set WM_CLIENT_MACHINE, WM_LOCALE_NAME and _NET_WM_PID on
X11 windows as window manager need these to map windows to processes
and we might lose functionality without them.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_x.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 662e9e6b0..c84be4c15 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -355,6 +355,7 @@ static Atom fl_XaTextUriList; static Atom fl_XaImageBmp; static Atom fl_XaImagePNG; static Atom fl_INCR; +static Atom fl_NET_WM_PID; static Atom fl_NET_WM_NAME; // utf8 aware window label static Atom fl_NET_WM_ICON_NAME; // utf8 aware window icon name static Atom fl_NET_SUPPORTING_WM_CHECK; @@ -719,6 +720,7 @@ void fl_open_display(Display* d) { fl_XaImageBmp = XInternAtom(d, "image/bmp", 0); fl_XaImagePNG = XInternAtom(d, "image/png", 0); fl_INCR = XInternAtom(d, "INCR", 0); + fl_NET_WM_PID = XInternAtom(d, "_NET_WM_PID", 0); fl_NET_WM_NAME = XInternAtom(d, "_NET_WM_NAME", 0); fl_NET_WM_ICON_NAME = XInternAtom(d, "_NET_WM_ICON_NAME", 0); fl_NET_SUPPORTING_WM_CHECK = XInternAtom(d, "_NET_SUPPORTING_WM_CHECK", 0); @@ -2473,6 +2475,15 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) mask, &attr)); int showit = 1; + // Set WM_CLIENT_MACHINE and WM_LOCALE_NAME + XSetWMProperties(fl_display, xp->xid, NULL, NULL, NULL, 0, NULL, NULL, NULL); + + // Set _NET_WM_PID + long pid; + pid = getpid(); + XChangeProperty(fl_display, xp->xid, fl_NET_WM_PID, + XA_CARDINAL, 32, 0, (unsigned char *)&pid, 1); + if (!win->parent() && !attr.override_redirect) { // Communicate all kinds 'o junk to the X Window Manager: |
