Fixed GTK window initial state that cannot be set to withdrawn
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 1 Jun 2013 03:03:42 +0000 (23:03 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 1 Jun 2013 03:04:03 +0000 (23:04 -0400)
Based on code from wmudmount:
    http://wmudmount.sourceforge.net/

pixmaps/master.xpm [new file with mode: 0644]
pixmaps/wmaker-tile-60x60.xpm [deleted file]
src/clock.c
src/dockapp.c
src/dockapp.h

diff --git a/pixmaps/master.xpm b/pixmaps/master.xpm
new file mode 100644 (file)
index 0000000..8c86b40
--- /dev/null
@@ -0,0 +1,184 @@
+/* XPM */
+static char * master_xpm[] = {
+"64 64 117 2",
+"      c None",
+".     c #737584",
+"+     c #5A5963",
+"@     c #42454A",
+"#     c #313439",
+"$     c #293031",
+"%     c #212429",
+"&     c #42414A",
+"*     c #525963",
+"=     c #6B6D7B",
+"-     c #84828C",
+";     c #4A4D52",
+">     c #000400",
+",     c #000000",
+"'     c #212021",
+")     c #292C29",
+"!     c #393839",
+"~     c #4A4552",
+"{     c #5A5D6B",
+"]     c #393C39",
+"^     c #848284",
+"/     c #BDBABD",
+"(     c #DEDFDE",
+"_     c #FFFFFF",
+":     c #FFFBFF",
+"<     c #525552",
+"[     c #7B7D7B",
+"}     c #52555A",
+"|     c #94929C",
+"1     c #52515A",
+"2     c #101010",
+"3     c #424142",
+"4     c #A5A2A5",
+"5     c #F7F3F7",
+"6     c #E7E7E7",
+"7     c #080C10",
+"8     c #4A4952",
+"9     c #63656B",
+"0     c #5A5D5A",
+"a     c #D6D7D6",
+"b     c #B5B2B5",
+"c     c #5A595A",
+"d     c #525563",
+"e     c #292829",
+"f     c #ADAAAD",
+"g     c #848684",
+"h     c #525152",
+"i     c #313431",
+"j     c #6B696B",
+"k     c #4A494A",
+"l     c #EFEBEF",
+"m     c #ADA6AD",
+"n     c #080C08",
+"o     c #9C9E9C",
+"p     c #4A4D4A",
+"q     c #CECBCE",
+"r     c #737573",
+"s     c #E7E3E7",
+"t     c #6B6D6B",
+"u     c #312C31",
+"v     c #DEDBDE",
+"w     c #FFF7FF",
+"x     c #101410",
+"y     c #F7F7F7",
+"z     c #393C42",
+"A     c #424542",
+"B     c #636563",
+"C     c #393842",
+"D     c #7B797B",
+"E     c #6B6D73",
+"F     c #737173",
+"G     c #212421",
+"H     c #313031",
+"I     c #A5A6A5",
+"J     c #292C31",
+"K     c #8C8A8C",
+"L     c #212821",
+"M     c #D6D3D6",
+"N     c #212029",
+"O     c #B5BAB5",
+"P     c #BDBEBD",
+"Q     c #C6C7C6",
+"R     c #293029",
+"S     c #424952",
+"T     c #EFEFEF",
+"U     c #424942",
+"V     c #181C21",
+"W     c #949294",
+"X     c #5A615A",
+"Y     c #B5B6B5",
+"Z     c #A5AAA5",
+"`     c #949694",
+" .    c #181C18",
+"..    c #737973",
+"+.    c #949A94",
+"@.    c #636163",
+"#.    c #ADAEAD",
+"$.    c #292429",
+"%.    c #4A514A",
+"&.    c #181818",
+"*.    c #9C9A9C",
+"=.    c #525952",
+"-.    c #9CA29C",
+";.    c #212829",
+">.    c #313039",
+",.    c #39414A",
+"'.    c #4A515A",
+").    c #E7EBE7",
+"!.    c #636963",
+"~.    c #CECFCE",
+"{.    c #8C8E8C",
+"].    c #394139",
+"^.    c #393442",
+"/.    c #C6CBC6",
+"(.    c #080808",
+"_.    c #C6C3C6",
+":.    c #393C4A",
+"                                                                                                                                ",
+"                                                                                                                                ",
+"                                                    . + @ # $ % % $ # & * =                                                     ",
+"                                            - ; % > , , > ' ) ! ! ) ' > , , > % ~                                               ",
+"                                        { % , > ] ^ / ( _ _ : < < _ _ _ ( / [ ] > , ' }                                         ",
+"                                  | 1 2 , 3 4 5 _ _ _ _ _ _ 6 , , 6 _ _ _ _ _ _ 5 4 3 , 7 8                                     ",
+"                                9 2 , 0 a _ _ _ _ _ _ _ _ _ _ b b _ _ _ _ _ _ _ _ _ _ a c , 7 d                                 ",
+"                              e , ] f 5 _ _ _ _ _ _ _ : g > h _ i j ! k l _ _ _ _ _ _ _ 5 m ] , %                               ",
+"                          = 7 n 4 o , p _ _ _ _ _ _ _ q q , h _ r _ s , t _ _ _ _ _ _ _ k , o 4 n n                             ",
+"                        } , u v _ / > t _ _ _ _ _ _ _ _ _ , h _ _ _ 5 , j _ _ _ _ _ _ _ j > / _ v u , 8                         ",
+"                      @ , < : _ _ _ w g > h : g > h _ _ _ , h _ _ _ o x v _ _ _ : g > h _ : _ _ _ y < , z                       ",
+"                    @ , j _ _ _ _ _ q q , h q q , h _ _ _ , h _ _ / A ( _ _ _ _ q q , h _ _ _ _ _ _ _ B , C                     ",
+"                  } , j _ _ _ _ _ _ _ _ , h _ _ , h _ _ _ , h _ D p q q t _ _ _ _ _ , h _ _ _ _ _ _ _ _ j , 8                   ",
+"                E , < _ _ _ _ _ _ _ _ _ , h _ _ , h _ s F , G [ , , , , h _ _ _ _ _ , h _ _ _ ( _ _ _ _ _ p , +                 ",
+"                7 H : _ _ _ _ _ _ _ _ _ , h _ _ , h _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ , h _ _ [ G I _ _ _ _ y J n E               ",
+"              e n v _ _ _ _ _ _ _ _ _ _ , h _ _ , h _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ , h _ K G L M _ _ _ _ _ v n N               ",
+"            9 , 4 _ _ _ _ _ _ _ _ _ s F , G r F , G g _ _ _ _ _ _ _ _ _ _ _ _ _ s F , G 0 G G O _ _ _ _ _ _ _ o , 1             ",
+"            2 ] o / _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ P G G I _ _ _ _ _ _ _ / o ! 7             ",
+"          1 , f , > w g > h _ 6 3 t 3 6 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Q ) G K _ _ i j ! k l : > , f , &           ",
+"          2 c 5 p t q q , h _ c ] _ ] c _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ v R G r _ _ _ r _ s , t _ j p 5 c 7           ",
+"        { , a _ _ _ _ _ , h _ x h _ p x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 6 ] G B _ _ _ _ _ _ 5 , j _ _ _ _ M , S         ",
+"        % 3 _ _ _ _ _ _ , h _ , h _ h , _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ T U G h y _ _ _ _ _ _ o x v _ _ _ _ _ 3 V         ",
+"        , 4 _ _ _ _ _ _ , h _ 2 h _ p x _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ y h G A T _ _ _ _ _ _ / A ( _ _ _ _ _ _ o ,         ",
+"      ; > y _ _ _ _ _ _ , h _ < ] _ ] < _ _ _ _ _ _ _ _ _ _ _ _ _ _ < l _ _ B G ] 6 _ _ _ _ _ _ D p q q t _ _ _ _ _ 5 > z       ",
+"      % ] _ _ _ _ _ s F , G g s ] j ] s _ _ _ _ _ _ _ _ _ _ _ _ _ v L 5 _ [ G R v _ _ _ _ _ _ T , , , , h _ _ _ _ _ _ ! V       ",
+"      > ^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W X _ K G L Q _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ >       ",
+"    . , Y _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ k Z I G G / _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Y , d     ",
+"    { , ( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ( G b G G I _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ( , @     ",
+"    @ > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ` p L G K _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > #     ",
+"    #  ._ _ _ _ P G < A s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ` p L G G .._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c F ] i v _ _ _ _  .e     ",
+"    J ) : 6 _ _ G , 5 A h _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +.G G G G A _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ P _ T , @._ _ 6 : ) N     ",
+"    e ! < , b _ > , _ h 2 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ p G j B G U _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a , ^ _ #., < ! V     ",
+"    $.! < , b _ i , l ! > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ %.G B B G G 4 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f &.A : _ #., < ! V     ",
+"    J ) _ 6 _ _ v < j e  ._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ *.G G G G G G =.s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ M , [ _ _ 6 _ ) N     ",
+"    #  ._ _ _ _ Q : _ ) t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ j ) U 3 G G G ) -._ _ _ _ _ _ _ _ _ _ _ _ B _ T , @._ _ _ _  .;.    ",
+"    & > _ _ _ _ ^ h 0 < 5 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 0 ` _ _ Z R G G G < ( _ _ _ _ _ _ _ _ _ _ ] t ] ! v _ _ _ _ > >.    ",
+"    + , ( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ T G ( _ _ _ 6 @.G G G ) o _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ( , ,.    ",
+"    = , Y _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Z k _ _ _ _ _ _ #.R G G G < ( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Y , '.    ",
+"      > [ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ X W _ _ _ _ _ _ _ ).B G G G e +._ _ _ _ _ _ _ _ _ _ _ _ _ _ [ >       ",
+"      % ] _ _ _ _ _ _ Y ) c ! B _ _ _ _ _ _ _ _ _ _ _ _ 5 L v _ _ _ _ _ _ _ _ _ #.H G G G G s _ _ f , h _ _ _ _ _ _ _ ! V       ",
+"      8 > 5 _ _ _ _ _ 2 , : 4 , Y _ _ _ _ _ _ _ _ _ _ _ #.A _ _ _ _ _ _ _ _ _ _ _ l !.G G G F _ s h , h _ _ _ _ _ _ 5 > #       ",
+"        , 4 _ _ _ _ _ i , T *., ~._ _ _ _ _ _ _ _ _ _ _ B {._ _ _ _ _ _ _ _ _ _ _ _ _ b i G *._ h s , h _ _ _ _ _ _ o , *       ",
+"        ' 3 _ _ _ _ _ ( ' A ' D _ _ _ _ _ _ _ _ _ _ _ y e M _ _ _ _ _ _ _ _ _ _ _ _ _ _ : 6 _ K I _ , h _ _ _ _ _ _ 3 &.        ",
+"        } , M _ _ _ _ H , 5 o , M _ _ _ _ _ _ _ _ _ _ Y ]._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ] B B , ' K _ _ _ _ M , z         ",
+"          7 c 5 k j _ n , : I , Y _ _ _ _ _ _ _ _ _ _ t g _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ , h _ _ j p 5 c n           ",
+"          8 , f , > : f G 0 ] c : _ _ _ _ _ _ _ _ _ y ) ~._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ y F , G f : > , I , ^.          ",
+"            2 ] o / _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / ! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / o ! n             ",
+"            d , o _ _ _ _ _ _ _ _ _ _ , , , , , _ _ F ^ _ _ _ _ _ _ _ _ _ _ _ _ n , , , q _ _ _ _ _ _ _ _ _ _ o , @             ",
+"              % n v _ _ _ _ _ _ _ _ _ A Y Y *.e _ : R /._ _ _ _ _ _ _ _ _ _ _ _ n ~.~.~.y _ _ _ _ _ _ _ _ _ v (.V               ",
+"                n H y _ _ _ _ _ _ _ _ ( _ _ j I _ P i _ _ _ _ _ _ _ _ _ _ _ _ _ n {.k [ : _ _ _ _ _ _ _ _ y ) (.                ",
+"                  , h _ _ _ _ _ _ _ _ _ _ 6 ) _ _ r [ _ _ _ y B c j ) _ _ _ _ _ Q _ Q , K _ _ _ _ _ _ _ _ p , ~                 ",
+"                  8 , j _ _ _ _ _ _ _ _ _ F o _ : i _._ _ _ F e _ _ / _ _ _ _ _ _ _ : , c _ _ _ _ _ _ _ j , C                   ",
+"                    C , B _ _ _ _ _ _ _ T e : _ Q H : _ _ _  .) r h v _ _ _ _ _ 6 _ v , ^ _ _ _ _ _ _ B , J                     ",
+"                      z , h y _ _ _ : _ [ W _ _ [ r _ _ _ _ , ) _ ! i _ _ _ _ _ F D ) < 5 : _ _ _ y h , u                       ",
+"                        S , u v _ Y > j _ _ _ _ b Q _ _ _ _ n h _ < > _ _ _ _ _ _ _ _ _ j > / _ a ) , C                         ",
+"                          + n (.o o , p _ _ _ _ _ _ _ _ _ _ p A _ A G _ _ _ _ _ _ _ _ _ k , 4 o (.(.~                           ",
+"                              N , ! m 5 _ _ _ _ _ _ _ _ _ _ ( 3 j e P _ _ _ _ _ _ _ _ _ 5 f ! , V                               ",
+"                                1 7 , c M _ _ _ _ _ _ _ _ _ _ #.b _ _ _ _ _ _ _ _ _ _ M c , n @                                 ",
+"                                    & 7 , 3 o 5 _ _ _ _ _ _ 6 , , 6 _ _ _ _ _ _ 5 o 3 , n ^.                                    ",
+"                                        8 V , > ! [ Y ( _ _ : < < _ _ _ ( Y [ ! , , &.:.                                        ",
+"                                              z V > , , >  .) ! ! )  .> , , > V # *                                             ",
+"                                                    d @ # e N V  .N ;.>.,.'.                                                    ",
+"                                                                                                                                ",
+"                                                                                                                                "};
diff --git a/pixmaps/wmaker-tile-60x60.xpm b/pixmaps/wmaker-tile-60x60.xpm
deleted file mode 100644 (file)
index 08685da..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/* XPM */
-static const char *wmaker_tile_60x60_xpm[] = {
-"60 60 74 1",
-"      c None",
-".     c #A4A1B4",
-"+     c #9C9DB4",
-"@     c #A49DB4",
-"#     c #9C9DAC",
-"$     c #9C99AC",
-"%     c #9499A4",
-"&     c #9C95AC",
-"*     c #9495A4",
-"=     c #9491A4",
-"-     c #8B919C",
-";     c #948DA4",
-">     c #8B8D9C",
-",     c #8B899C",
-"'     c #838994",
-")     c #8B859C",
-"!     c #838594",
-"~     c #838194",
-"{     c #7B818B",
-"]     c #7B7D8B",
-"^     c #A49DAC",
-"/     c #A499AC",
-"(     c #9C91AC",
-"_     c #837D94",
-":     c #9495AC",
-"<     c #9C99A4",
-"[     c #9C95A4",
-"}     c #9C91A4",
-"|     c #7B798B",
-"1     c #A499B4",
-"2     c #8B91A4",
-"3     c #94919C",
-"4     c #9491AC",
-"5     c #8B8DA4",
-"6     c #737983",
-"7     c #948D9C",
-"8     c #7B758B",
-"9     c #737583",
-"0     c #83899C",
-"a     c #8B8594",
-"b     c #83859C",
-"c     c #737183",
-"d     c #6A717B",
-"e     c #83818B",
-"f     c #736D83",
-"g     c #7B8194",
-"h     c #837D8B",
-"i     c #6A6D7B",
-"j     c #73798B",
-"k     c #7B7983",
-"l     c #7B7583",
-"m     c #7B7D94",
-"n     c #6A697B",
-"o     c #626973",
-"p     c #73758B",
-"q     c #73717B",
-"r     c #6A7183",
-"s     c #626573",
-"t     c #6A6D83",
-"u     c #736D7B",
-"v     c #6A657B",
-"w     c #62697B",
-"x     c #6A6973",
-"y     c #62657B",
-"z     c #6A6573",
-"A     c #626173",
-"B     c #5A616A",
-"C     c #62616A",
-"D     c #5A6173",
-"E     c #5A5D6A",
-"F     c #5A596A",
-"G     c #525D62",
-"H     c #525962",
-"I     c #525562",
-"....+.@+@#+$#$$$%&$*&**=*===-=;-;>>>,>,,',)')!!!!~!~{~~]~]]]",
-"...@.^####/#$$$$&$****(*=====;->>>;,>,,,,)'!!!)!~!~~~~]{]]_]",
-"..@.#+@#@$#$$$$:<*:[:}*====-;->;>;,>,,,')'!)!)!~!~~{~]{_]_]|",
-".@.#@^##$#$$$$:<:&**=*====-;-;>>>,>,,,')')!!!!~!~~{~]~]]]]|]",
-"+.#@#+#1#$$$$:<:[**(*===23;-;>>;,>,,',)')!!)!~!~{~~]~]]_]|]|",
-".^+^+^$#$$$$:<:[:*4*====35-;>>>,>,,,,!')!!!!~!~~~{]~]]]]|]||",
-"@#@##$#$$$$*$*&**=*====-;-;>>>,>,,,')')!!!!~!~~{~]~]]]]|]||6",
-"+###1#$$$$*$*&**4*===32;-;>>>,>,,,')')!!!!~!~~{~]~]]]]|]||6|",
-"@#@$#$$$$*$*&**=*====27-;>>>,>,,,')')!!!!~!~~{~]~]]]]|]||6|6",
-"##$#$$$$*$*&**=*====3;-;>>>,>,,,,)')!!!!~!~~~~]~]]]]|]||||68",
-"+/#$$$$*$*&**=*====35-;>>>,>,,,,!')!!!!~!~~~{]~]]]]|]|||6686",
-"$#$$$$*$*&**=*====353;>>>,>,,,,!,)!!!!~!~~~{_~]]]]|]|||6|869",
-"#$$$$:$*&**=*=====535>>>,>,,,,!,!!!!!~!~~~{_{]]]]|]|||6|9699",
-"$$$$:<*&**=*=====>357>7,>,,,,!,!)!)!~!~~~{_{_]_]|]|||6|9|989",
-"$$$:<:&**=*=====>=57>>,>,,,,!,!)!!!~!~~~{_{_]]]|]|||6|9|9999",
-"$$:<:[**=*=====>=>7>>,>,,,0a0ab!!!~!~~{~]~]]]]|]||6|6869999c",
-"%&<:[:*4*=====>=>;>5,>,,,0a0ab!a!~!~~{~]~]]_]|]||6|6869899c9",
-"&$*&**=*=====>=>;>>,>,,,0a0ab!!!~!~~{~]~]]]]|]||6|6869999c9c",
-"$*:**4*====35357>>,>,,,')')!!!!~!~~{~]~]]]]|]||6|6869999c9cd",
-"**[*(*====35357>5,>,,,')')!!b!~!~~{~]~]]]]|]||6|6869999c9cdc",
-"&*:=*====35357>>,>,,,')')!!!!~!~~{~]~]]]]|]||6|6869999c9cdcd",
-"**}*===32;-;>>>,>,,,')')!!!!~!~~e~]~]]]]|]||||6869999c9cccdf",
-"*(*====27-;>>7,>,,,')')!!!!~!~~eg]~]]]]|]|||66869999c9ccddfd",
-"=*====-;-;>>>,>,,,')')!!!!~!~~egh~]]]]|]|||6|869999c9ccdcfdi",
-"*===23;-;>>>,>,,,0)')!!!!~!~~~ghg]]]]|]|||6|969999c9ccdcidii",
-"====35-;>>>,>,,,0a')!!!!~!~~~{hgh]h]|]|||6|9|9899c9ccdcicifi",
-"===-;-;>>>,>,,,0a0)!!!!~!~~~{_gh]]]|]|||6|9|9999c9ccdciciiii",
-"==-;-;>>>,>,,,,a0a!!!!~!~~~{_{h]]]|]||jkjlj9999c9cdcdfdiiiii",
-"-=;-;>>>,>,,,,!0ab!b!~!~~~{_{_]m]|]||jkjlj9l99c9cdcdfdifiiin",
-"=;-;>>>,>,,,,!,ab!!!~!~~~{_{_]]]|]||jkjlj9999c9cdcdfdiiiiini",
-";->>>>,>,,,,!,!b!!!~!~~eghgh]]]|]||6|6869999c9cdcdfdiiiiinio",
-"->;>;,>,,,,!,!)!a!~!~~eghgh]m]|]||6|6869p99c9cdcdfdiiiiinion",
-";>>>,>,,,,!,!)!!!~!~~eghgh]]]|]||6|6869999c9cdcdfdiiiiiniono",
-">>;,>,,,')')!!!!~!~~{~]~]]]]|]||6|6869999c9cqcdfdiiiiininnon",
-">;,>,,,')')!!)!~!~~{~]~]]h]|]||6|6869999c9cqrdfdiiiiininoons",
-">,>,,,')')!!!!~!~~{~]~]]]]|]||6|6869999c9cqrqfdiiiiininonnso",
-",>,,',)')!!!!~!~~{~]~]]]]|]||j|6869999c9ccrqtdiiiiininonosos",
-">,,,,!')!!!!~!~~{~]~]]]]|]||jk6869999c9ccdqtqiuiiininonovovs",
-",,,')')!!!!~!~~{~]~]]]]|]||jkj869999c9ccdctqiiiiininonovosss",
-",,')')!!!!~!~~~~]~]]]]|]|||kjl69999c9ccdciqiiiiiniwxwxyossss",
-"',)')!!!!~!~~~{]~]]]]|]|||6jlj9p99c9ccdcicitiiiniwxwxyozsssA",
-",)')!!!!~!~~~{_~]]]]|]|||6|lj9999c9ccdciciiiiiniwxwxyossssAs",
-")'!!!!!~!~~~{_{]]]]|]|||6|9j9999c9cqrqtqiiiiiniononsossssAsB",
-"'!)!)!~!~~~{_{_]_]|]|||6|9|9l99c9cqrqtqitiiiniononsoysssAsBA",
-")!!!!~!~~~{_{_]]]|]|||6|9|9999c9cqrqtqiiiiiniononsossssAsBAB",
-"!!)!~!~~{~]~]]]]|]||6|6869999c9cdcdfdiiiiiniononsossssAsCABA",
-"!)!~!~~{~]~]]_]|]||6|6869899c9cdcdfdiuiiiniononsossssAsCDBAB",
-"!!~!~~{~]~]]]]|]||6|6869999c9cdcdfdiiiiiniononsossssAsCDCABE",
-"!~!~{~~]~]]]]|]||6|6869999c9cdcdfdiiiiiniwnonsossssAsADCDBEB",
-"~!~~~{]~]]]]|]||6|6869999c9cdcdfdiiiiiniwxonsossssAsABCDCECE",
-"!~~{~]~]]]]|]||6|6869999c9cdcdfdiiiiiniwxwnsossssAsABADCEBEE",
-"~~{~]~]]]]|]||||6869999c9cccdfdiiiiininxwxsossssAsABABCEBEEE",
-"{~~]~]]]]|]|||66869999c9ccddfdiiiiininowxyoysssAsABABAEDEEEE",
-"~~]~]]]]|]|||6|869999c9ccdcfdiiiiininonxyossssAsABABAEBEEEEF",
-"~]{]]]]|]|||6|969999c9ccdcidiiiiininonoyossssAsCDCDCEBEEEEFG",
-"]{_]_]|]|||6|9|9899c9ccdcicifiiininonovozsssAsCDCDCEDEEEEFGF",
-"~]]]]|]|||6|9|9999c9ccdciciiiiininonovossssAsCDCDCEBEEEEFGFH",
-"]]_]|]||6|6869999c9cdcdfdiiiiiniononsossssAsBABABEBEEEEFGFHF",
-"]_]|]||6|6869899c9cdcdfdifiiiniononsovsssAsBABABECEEEEFGFHFH",
-"]]|]||6|6869999c9cdcdfdiiiiiniononsossssAsBABABEBEEEEFGFHFHI"};
index 19bb67b..a8af97e 100644 (file)
@@ -377,12 +377,6 @@ hvclock_expose(GtkWidget *clock, GdkEventExpose *event)
        /* Get a cairo_t */
        cr = gdk_cairo_create(clock->window);
 
-       if (hvclock_infos.dockapp_mode == true) {
-               gdk_cairo_set_source_pixbuf(cr, dockapp.background_pixbuf,
-                                           0, 0);
-               cairo_paint(cr);
-       }
-
        cairo_rectangle(cr, event->area.x, event->area.y,
                        event->area.width, event->area.height);
        cairo_clip(cr);
index 6558ab6..d3953de 100644 (file)
@@ -3,6 +3,10 @@
  *
  * Copyright (C) 2005 Hugo Villeneuve <hugo@hugovil.com>
  *
+ * Code for GTK withdraw ack taken from wmudmount
+ * http://wmudmount.sourceforge.net/
+ * Copyright © 2010  Brad Jorsch <anomie@users.sourceforge.net>
+ *
  * This program 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
 #include "clock.h"
 #include "hvclock.h"
 #include "dockapp.h"
-#include "wmaker-tile-60x60.xpm"
+#include "master.xpm"
+
+#define GTK_WITHDRAWN_HACK 1
 
 /* Width and height in pixels of Window Maker icons. */
 #define ICON_SIZE 64
 
-/* Specifies the border width */
-#define BWIDTH 2
-
 static void
 dockapp_set_withdrawn_state(Display *d, Window w)
 {
@@ -57,6 +60,61 @@ dockapp_set_withdrawn_state(Display *d, Window w)
        XFree(hints);
 }
 
+/*
+ * Gtk/Gdk gives us no way to specify intial_state = WithdrawnState,
+ * because ICCCM doesn't list it in the little table for initial_state.
+ * And it even overrides it just before mapping the window!
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=139322
+ *
+ * But there is a hack: an X window isn't actually mapped until its
+ * parent is mapped. So if we reparent the troublesome window to an
+ * unmapped window and call GTK's map function, we can then easily
+ * change the hints before reparenting it back to the root window.
+ */
+static void
+dockapp_gtk_withdrawn_hack(GtkWidget *dockwin, GtkWidget *iconwin)
+{
+       Display *d;
+       Window p, root, *children;
+       unsigned int nchildren;
+       Window win_temp;
+       Window win_orig;
+
+       d = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+       win_orig = GDK_WINDOW_XID(dockwin->window);
+
+       XQueryTree(d, win_orig, &root, &p, &children, &nchildren);
+
+       if (children)
+               XFree(children);
+
+       win_temp = XCreateSimpleWindow(d, p, 0, 0, 1, 1, 0, 0, 0);
+       XReparentWindow(d, win_orig, win_temp, 0, 0);
+       gtk_widget_show(dockwin);
+
+       dockapp_set_withdrawn_state(d, win_orig);
+
+       XReparentWindow(d, win_orig, p, 0, 0);
+       XDestroyWindow(d, win_temp);
+}
+
+static void
+dockapp_set_mask(GtkWidget *dockwin, GtkWidget *iconwin)
+{
+       GdkPixmap *pixmap;
+       GdkBitmap *mask;
+
+       pixmap = gdk_pixmap_create_from_xpm_d(iconwin->window, &mask, NULL,
+                                             master_xpm);
+       if(!pixmap) {
+               printf("Could not load master pixmap\n");
+               exit(1);
+       }
+
+       gtk_widget_shape_combine_mask(dockwin, mask, 0, 0);
+       gtk_widget_shape_combine_mask(iconwin, mask, 0, 0);
+}
+
 /*******************************************************************************
  * New window creation and initialization for a Dockable Application
  ******************************************************************************/
@@ -68,26 +126,35 @@ dockapp_init(int argc, char *argv[], char *display_arg, char *geometry_arg)
 
        gtk_init(&argc, &argv);
 
-       if (hvclock_infos.dockapp_mode == true)
-               dockapp.background_pixbuf =
-                       gdk_pixbuf_new_from_xpm_data(wmaker_tile_60x60_xpm);
-
        dockwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+       iconwin = gtk_window_new(GTK_WINDOW_POPUP);
+
+       gtk_window_set_wmclass(GTK_WINDOW(dockwin), g_get_prgname(), "DockApp");
+       gtk_window_set_wmclass(GTK_WINDOW(iconwin), g_get_prgname(), "DockApp");
+
+       gtk_widget_set_size_request(dockwin, ICON_SIZE, ICON_SIZE);
+       gtk_widget_set_size_request(iconwin, ICON_SIZE, ICON_SIZE);
+       gtk_widget_set_app_paintable(dockwin, TRUE);
+       gtk_widget_set_app_paintable(iconwin, TRUE);
+
        gtk_window_set_default_size(GTK_WINDOW(dockwin), ICON_SIZE, ICON_SIZE);
 
-       iconwin = gtk_window_new(GTK_WINDOW_POPUP);
        g_signal_connect(dockwin, "destroy", G_CALLBACK(gtk_main_quit), NULL);
 
        gtk_widget_realize(dockwin);
        gtk_widget_realize(iconwin);
+       gdk_window_set_icon(dockwin->window, iconwin->window, NULL, NULL);
+
+       dockapp_set_mask(dockwin, iconwin);
 
        hvclock_init(dockwin, iconwin);
 
-       gtk_widget_show_all(dockwin);
+       gtk_widget_show(iconwin);
 
-       if (hvclock_infos.dockapp_mode == true) {
-               dockapp_set_withdrawn_state(
-                       GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
-                       GDK_WINDOW_XWINDOW(dockwin->window));
-       }
+#ifdef GTK_WITHDRAWN_HACK
+       dockapp_gtk_withdrawn_hack(dockwin, iconwin);
+#else
+       gtk_widget_show(dockwin);
+       gdk_window_withdraw(dockwin->window);
+#endif
 }
index 523b70f..be19f47 100644 (file)
 
 #include <gdk/gdkx.h>
 
-struct dockapp_t {
-       GdkPixbuf *background_pixbuf;
-};
-
 void
 dockapp_init(int argc, char *argv[], char *display_arg, char *geometry_arg);
 
-/* Exported variables */
-#undef _SCOPE_
-#ifdef DOCKAPP_M
-#define _SCOPE_ /**/
-#else
-#define _SCOPE_ extern
-#endif
-
-_SCOPE_ struct dockapp_t dockapp;
-
 #endif /* DOCKAPP_H */