repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: b9eb046d67b8732e6078924ff7edb63ff7dd8870:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit b9eb046d67b8732e6078924ff7edb63ff7dd8870
Author: Mikael Magnusson 
Date:   Tue Jul 29 13:50:05 2014 +0000

    Add -dockapp option

diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod
index 222dbccbdc21106c2d70dfa9b966079f50806a2a..
index ..15a1a79ca867be9fd1a3cd2e5d6f9f809482a4aa 100644
--- a/doc/rxvt.1.pod
+++ b/doc/rxvt.1.pod
@@ -309,6 +309,11 @@ support MWM hints (e.g. kwin), enables override-redirect mode.
 Compile I: Sets override-redirect on the window; resource
 B.

+=item B<-dockapp>
+
+Sets the initial state of the window to WithdrawnState, which makes
+window managers that support this extension treat it as a dockapp.
+
 =item B<-sbg>

 Compile I: Disable the usage of the built-in block graphics/line
diff --git a/src/init.C b/src/init.C
index c3876d24fa1cb408765fc544c7fb7afa33086d1e..
index ..78d93158d0e2382600cf81d632eeb53afc4d4a1a 100644
--- a/src/init.C
+++ b/src/init.C
@@ -1398,7 +1398,9 @@ rxvt_term::create_windows (int argc, const char *const *argv)

   wmHint.flags         = InputHint | StateHint | WindowGroupHint;
   wmHint.input         = True;
-  wmHint.initial_state = option (Opt_iconic) ? IconicState : NormalState;
+  wmHint.initial_state = option (Opt_iconic) ? IconicState
+                         : option (Opt_dockapp) ? WithdrawnState
+                         : NormalState;
   wmHint.window_group  = top;

   XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc,
diff --git a/src/optinc.h b/src/optinc.h
index d814035c42dbf51111d7fdbfc1df1382da0b0490..
index ..af68751d85f8a534c2f91bc0bdb31983b29ee1ef 100644
--- a/src/optinc.h
+++ b/src/optinc.h
@@ -64,4 +64,5 @@
 #else
  nodef(buffered)
 #endif
+ def(dockapp)

diff --git a/src/xdefaults.C b/src/xdefaults.C
index 56f22346f496f03bb565c4d18943c1b962496273..
index ..7ca99528648f5ee3a9b13f8cdbe0e86aa375e0d5 100644
--- a/src/xdefaults.C
+++ b/src/xdefaults.C
@@ -98,6 +98,7 @@ optList[] = {
               SWCH ("iconic", Opt_iconic, 0, "start iconic"),
               SWCH ("ic", Opt_iconic, 0, NULL),	/* short form */
               STRG (Rs_chdir, "chdir", "cd", "string", "start shell in this directory"),
+              SWCH ("dockapp", Opt_dockapp, 0, "start as dockapp"),
               BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, 0, "reverse video"),
               BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, 0, "login shell"),
               BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, 0, "jump scrolling"),

-----END OF PAGE-----