aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:59 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:59 +0200
commitb7494f082ad56049c24927afdf89abc852fe06bb (patch)
tree332640e859cbc9711ed183fe1e86895d1d945ca5 /nx-X11/programs/Xserver/hw/nxagent/Rootless.c
parentc078024019d334eb96fbfaf922c64297c9a0c6e0 (diff)
downloadnx-libs-b7494f082ad56049c24927afdf89abc852fe06bb.tar.gz
nx-libs-b7494f082ad56049c24927afdf89abc852fe06bb.tar.bz2
nx-libs-b7494f082ad56049c24927afdf89abc852fe06bb.zip
Imported nxagent-3.4.0-8.tar.gznxagent/3.4.0-8
Summary: Imported nxagent-3.4.0-8.tar.gz Keywords: Imported nxagent-3.4.0-8.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Rootless.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c43
1 files changed, 34 insertions, 9 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
index a8ce4c7cd..612e71cf7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
@@ -626,6 +626,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
XlibAtom *atoms = malloc(nUnits * sizeof(*atoms));
Atom *input = value;
int i;
+ int j = 0;
freeMem = True;
export = True;
@@ -633,16 +634,40 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
for (i = 0; i < nUnits; i++)
{
- atoms[i] = nxagentLocalToRemoteAtom(input[i]);
-
- if (atoms[i] == None)
- {
- #ifdef WARNING
- fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
- (long int) input[i], validateString(NameForAtom(input[i])));
- #endif
- }
+ /*
+ * Exporting the _NET_WM_PING property could
+ * result in rootless windows being grayed out
+ * when the compiz window manager is running.
+ *
+ * Better solution would probably be to handle
+ * the communication with the window manager
+ * instead of just getting rid of the property.
+ */
+
+ if (strcmp(NameForAtom(input[i]), "_NET_WM_PING") != 0)
+ {
+ atoms[j] = nxagentLocalToRemoteAtom(input[i]);
+
+ if (atoms[j] == None)
+ {
+ #ifdef WARNING
+ fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
+ (long int) input[i], validateString(NameForAtom(input[i])));
+ #endif
+ }
+
+ j++;
+ }
+ #ifdef TEST
+ else
+ {
+ fprintf(stderr, "nxagentExportProperty: WARNING! "
+ "Not exporting the _NET_WM_PING property.\n");
+ }
+ #endif
}
+
+ nUnits = j;
}
else if (strcmp(typeS, "WINDOW") == 0)
{