summaryrefslogtreecommitdiffstats
path: root/src/tdedocker.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-03-31 22:41:41 +0900
committerMichele Calgaro <[email protected]>2020-03-31 22:41:41 +0900
commit6fcc661ff72af5a957a1a8d2737d2327dba8841e (patch)
tree284b56632512e37875a8a19a5792551e147402d1 /src/tdedocker.cpp
parent05add324c22f8fb2d1824a8a6145b2b8821e95bb (diff)
downloadtdedocker-6fcc661ff72af5a957a1a8d2737d2327dba8841e.tar.gz
tdedocker-6fcc661ff72af5a957a1a8d2737d2327dba8841e.zip
1) fixed bug when invoking tdedocker with options, which were not passed
to an existing instance 2) code restructure for tray label object 3) dockWhenLostFocus option is now saved/restored correctly 4) fixed issues with popup menu actions status Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/tdedocker.cpp')
-rw-r--r--src/tdedocker.cpp58
1 files changed, 53 insertions, 5 deletions
diff --git a/src/tdedocker.cpp b/src/tdedocker.cpp
index 8021e67..f32cea6 100644
--- a/src/tdedocker.cpp
+++ b/src/tdedocker.cpp
@@ -1,16 +1,16 @@
-/*
+/*
* Copyright (C) 2004 Girish Ramakrishnan All Rights Reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
@@ -101,6 +101,54 @@ void TDEDocker::notifyPreviousInstance(Window prevInstance)
{
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
s << TDECmdLineArgs::appName();
+
+ // Options
+ if (args->isSet("b"))
+ {
+ s << " -b";
+ }
+ if (args->isSet("d"))
+ {
+ s << " -d";
+ }
+ if (args->isSet("e"))
+ {
+ s << " -e";
+ }
+ if (args->isSet("f"))
+ {
+ s << " -f";
+ }
+ if (args->isSet("i"))
+ {
+ s << " -i " << args->getOption("i");
+ }
+ if (args->isSet("m"))
+ {
+ s << " -m";
+ }
+ if (args->isSet("o"))
+ {
+ s << " -o";
+ }
+ if (args->isSet("p"))
+ {
+ s << " -p " << args->getOption("p");
+ }
+ if (args->isSet("q"))
+ {
+ s << " -q";
+ }
+ if (args->isSet("t"))
+ {
+ s << " -t";
+ }
+ if (args->isSet("w"))
+ {
+ s << " -w " << args->getOption("w");
+ }
+
+ // Arguments
for (int i = 0; i < args->count(); i++)
{
s << " " << args->arg(i);
@@ -141,7 +189,7 @@ bool TDEDocker::x11EventFilter(XEvent * event)
if (!(client->message_type == 0x220679 && client->data.l[0] == 0xBABE))
return FALSE;
- TRACE("ClientMessage from PID=%ld. SelOwn=0x%x",
+ TRACE("ClientMessage from PID=%ld. SelOwn=0x%x",
client->data.l[1], (unsigned) mSelectionOwner);
char tmp[50];
struct stat buf;
@@ -153,7 +201,7 @@ bool TDEDocker::x11EventFilter(XEvent * event)
* are the same. This will prevent someone from executing arbitrary
* programs by sending client message. Of course, you can send a message
* only if you are authenticated to the X session and have permission to
- * create files in TMPFILE_PREFIX. So this code is there just for the
+ * create files in TMPFILE_PREFIX. So this code is there just for the
* heck of it.
*/
TRACE("User %i is trying something fishy...", buf.st_uid);