Re: [PATCH 01/14] wmkeys compilation bugs
On Sun, 16 Aug 2015 at 10:08:56 +, Rodolfo García Peñas (kix) wrote: > > "Carlos R. Mafra" escribió: > > >On Sat, 15 Aug 2015 at 23:15:11 +, Rodolfo García Peñas (kix) wrote: > >> > >>Doug Torrance escribió: > >> > >>>On 08/15/2015 06:29 PM, Rodolfo García Peñas (kix) wrote: > I modified all other dockapps. > >>> > >>>Thanks for doing this! > >>> > The wmbiff dockapp includes a different wmgeneral library. This dockapp > doesn't compile. I don't include this new code in libdockapps because > include code of application that doesn't compile IMO is not a good idea. > > Probably we should try to compile the wmbiff dockapps, and then, think > about include or not the three new functions in libdockapp. > >>> > >>>This is something I've looked at a little bit. I have a branch [1] with > >>>a partially working wmbiff which uses the shared wmgeneral library > >>>(after adding the wmbiff-specific functions to the library, as you > >>>mentioned). > >>> > >>>However, wmbiff is special in that it allows non-64x64 windows, and this > >>>is the main diverence from the main wmgeneral functions. I haven't > >>>gotten around to solving this issue yet. > >>> > >>>Doug > >>> > >>>[1] https://github.com/d-torrance/dockapps/tree/update-wmbiff > >> > >>Hi Doug, > >> > >>we can compile it with this little change in tlsComm.c: > >> > >>-struct connection_state *initialize_gnutls(UNUSED(int sd), > >>+struct connection_state *initialize_gnutls(UNUSED(intptr_t sd), > > > >Could you write this one-liner as a standalone patch to the current > >repo? I've just checked here that it indeed fixes the compilation, > >and it is good to have this change separated from any others. > > Sure, > > I just sent the patch. Great, thank you. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 01/14] wmkeys compilation bugs
"Carlos R. Mafra" escribió: On Sun, 16 Aug 2015 at 0:22:49 +0200, Rodolfo García Peñas (kix) wrote: Thank you Rodolfo, the diffstat of this series is simply awesome! 88 files changed, 51 insertions(+), 11084 deletions(-) Thanks Carlos. Rodolfo García Peñas (kix) http://www.kix.es/ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 01/14] wmkeys compilation bugs
"Carlos R. Mafra" escribió: On Sat, 15 Aug 2015 at 23:15:11 +, Rodolfo García Peñas (kix) wrote: Doug Torrance escribió: >On 08/15/2015 06:29 PM, Rodolfo García Peñas (kix) wrote: >>I modified all other dockapps. > >Thanks for doing this! > >>The wmbiff dockapp includes a different wmgeneral library. This dockapp >>doesn't compile. I don't include this new code in libdockapps because >>include code of application that doesn't compile IMO is not a good idea. >> >>Probably we should try to compile the wmbiff dockapps, and then, think >>about include or not the three new functions in libdockapp. > >This is something I've looked at a little bit. I have a branch [1] with >a partially working wmbiff which uses the shared wmgeneral library >(after adding the wmbiff-specific functions to the library, as you >mentioned). > >However, wmbiff is special in that it allows non-64x64 windows, and this >is the main diverence from the main wmgeneral functions. I haven't >gotten around to solving this issue yet. > >Doug > >[1] https://github.com/d-torrance/dockapps/tree/update-wmbiff Hi Doug, we can compile it with this little change in tlsComm.c: -struct connection_state *initialize_gnutls(UNUSED(int sd), +struct connection_state *initialize_gnutls(UNUSED(intptr_t sd), Could you write this one-liner as a standalone patch to the current repo? I've just checked here that it indeed fixes the compilation, and it is good to have this change separated from any others. Sure, I just sent the patch. Cheers, kix Rodolfo García Peñas (kix) http://www.kix.es/ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 01/14] wmkeys compilation bugs
On Sat, 15 Aug 2015 at 23:15:11 +, Rodolfo García Peñas (kix) wrote: > > Doug Torrance escribió: > > >On 08/15/2015 06:29 PM, Rodolfo García Peñas (kix) wrote: > >>I modified all other dockapps. > > > >Thanks for doing this! > > > >>The wmbiff dockapp includes a different wmgeneral library. This dockapp > >>doesn't compile. I don't include this new code in libdockapps because > >>include code of application that doesn't compile IMO is not a good idea. > >> > >>Probably we should try to compile the wmbiff dockapps, and then, think > >>about include or not the three new functions in libdockapp. > > > >This is something I've looked at a little bit. I have a branch [1] with > >a partially working wmbiff which uses the shared wmgeneral library > >(after adding the wmbiff-specific functions to the library, as you > >mentioned). > > > >However, wmbiff is special in that it allows non-64x64 windows, and this > >is the main diverence from the main wmgeneral functions. I haven't > >gotten around to solving this issue yet. > > > >Doug > > > >[1] https://github.com/d-torrance/dockapps/tree/update-wmbiff > > Hi Doug, > > we can compile it with this little change in tlsComm.c: > > -struct connection_state *initialize_gnutls(UNUSED(int sd), > +struct connection_state *initialize_gnutls(UNUSED(intptr_t sd), Could you write this one-liner as a standalone patch to the current repo? I've just checked here that it indeed fixes the compilation, and it is good to have this change separated from any others. -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 01/14] wmkeys compilation bugs
On Sun, 16 Aug 2015 at 0:22:49 +0200, Rodolfo García Peñas (kix) wrote: Thank you Rodolfo, the diffstat of this series is simply awesome! 88 files changed, 51 insertions(+), 11084 deletions(-) -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 01/14] wmkeys compilation bugs
Doug Torrance escribió: On 08/15/2015 06:29 PM, Rodolfo García Peñas (kix) wrote: I modified all other dockapps. Thanks for doing this! The wmbiff dockapp includes a different wmgeneral library. This dockapp doesn't compile. I don't include this new code in libdockapps because include code of application that doesn't compile IMO is not a good idea. Probably we should try to compile the wmbiff dockapps, and then, think about include or not the three new functions in libdockapp. This is something I've looked at a little bit. I have a branch [1] with a partially working wmbiff which uses the shared wmgeneral library (after adding the wmbiff-specific functions to the library, as you mentioned). However, wmbiff is special in that it allows non-64x64 windows, and this is the main diverence from the main wmgeneral functions. I haven't gotten around to solving this issue yet. Doug [1] https://github.com/d-torrance/dockapps/tree/update-wmbiff Hi Doug, we can compile it with this little change in tlsComm.c: -struct connection_state *initialize_gnutls(UNUSED(int sd), +struct connection_state *initialize_gnutls(UNUSED(intptr_t sd), I did the changes to run using wmgeneral, are attached for your testing. About the size, I don't know, I need more time. Cheers, kix Rodolfo García Peñas (kix) http://www.kix.es/ >From b465e053f6153c477eba250ecab9305c6c658148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 15 Aug 2015 23:47:29 +0200 Subject: [PATCH 1/2] Include the wmbiff functions of wmgeneral. The wmbiff application included some functions in wmgeneral. We need include these functions in the libdockapp library. Probably we should analize if these functions should be included in wmbiff and removed from here. --- libdockapp/src/wmgeneral.c | 39 +++ libdockapp/src/wmgeneral.h | 8 2 files changed, 47 insertions(+) diff --git a/libdockapp/src/wmgeneral.c b/libdockapp/src/wmgeneral.c index c624193..5511a31 100644 --- a/libdockapp/src/wmgeneral.c +++ b/libdockapp/src/wmgeneral.c @@ -84,6 +84,7 @@ Pixel back_pix, fore_pix; Window iconwin, win; GC NormalGC; XpmIcon wmgen; +XpmIcon wmgen_bkg; Pixmap pixmask; /*/ @@ -378,6 +379,44 @@ void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) { } +/* added for wmbiff */ +XFontStruct *f; +int loadFont(const char *fontname) +{ + if (display != NULL) { + f = XLoadQueryFont(display, fontname); + if (f) { + XSetFont(display, NormalGC, f->fid); + return 0; + } else { + printf("couldn't set font!\n"); + } + } + return -1; +} + +void drawString(int dest_x, int dest_y, const char *string, +const char *colorname, const char *bgcolorname, +int right_justify) +{ + int len = strlen(string); + XSetForeground(display, NormalGC, GetColor((char *) colorname)); + XSetBackground(display, NormalGC, GetColor((char *) bgcolorname)); + if (right_justify) + dest_x -= XTextWidth(f, string, len); + XDrawImageString(display, wmgen_bkg.pixmap, NormalGC, dest_x, dest_y, + string, len); +} + +void eraseRect(int x, int y, int x2, int y2, const char *bgcolorname) +{ + XSetForeground(display, NormalGC, GetColor((char *) bgcolorname)); + XFillRectangle(display, wmgen_bkg.pixmap, NormalGC, x, y, x2 - x, + y2 - y); +} + +/* end wmbiff additions */ + /***\ |* setMaskXY *| \***/ diff --git a/libdockapp/src/wmgeneral.h b/libdockapp/src/wmgeneral.h index c3454c5..620f4de 100644 --- a/libdockapp/src/wmgeneral.h +++ b/libdockapp/src/wmgeneral.h @@ -86,4 +86,12 @@ void setMaskXY(int, int); void parse_rcfile(const char *, rckeys *); +/* for wmbiff */ +int loadFont(const char *fontname); /* -1 on fail, 0 success. */ +void drawString(int dest_x, int dest_y, const char *string, +const char *colorname, const char *bgcolorname, +int right_justify); +void eraseRect(int x, int y, int x2, int y2, const char *bgcolorname); +/* end wmbiff */ + #endif -- 2.5.0 >From 1ccb7be60ad49b035e36ae056f8706f4f250c97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 16 Aug 2015 00:20:40 +0200 Subject: [PATCH 2/2] wmbiff --- wmbiff/Makefile.am | 3 +- wmbiff/configure.ac | 4 +- wmbiff/wmbiff/Makefile.am| 4 +- wmbiff/wmbiff/wmbiff.c | 27 +- wmbiff/wmgeneral/Makefile.am | 10 - wmbiff/wmgeneral/misc.c | 34 --- wmbiff/wmgeneral/misc.h | 9 - wmbiff/wmgeneral/wmgeneral.c | 621 --- wmbiff/wmgeneral/wmgeneral.h | 69 - 9 files changed, 21 insertions(+), 760 deletions(-) delete mode 100644 wmbiff/wmgeneral/Makefile.am delete mode 100644 wmbiff/wmgeneral/misc.c delete mode 100644 wmbiff/wmgeneral/misc.h delete mode 10
Re: [PATCH 01/14] wmkeys compilation bugs
On 08/15/2015 06:29 PM, Rodolfo García Peñas (kix) wrote: > I modified all other dockapps. Thanks for doing this! > The wmbiff dockapp includes a different wmgeneral library. This dockapp > doesn't compile. I don't include this new code in libdockapps because > include code of application that doesn't compile IMO is not a good idea. > > Probably we should try to compile the wmbiff dockapps, and then, think > about include or not the three new functions in libdockapp. This is something I've looked at a little bit. I have a branch [1] with a partially working wmbiff which uses the shared wmgeneral library (after adding the wmbiff-specific functions to the library, as you mentioned). However, wmbiff is special in that it allows non-64x64 windows, and this is the main diverence from the main wmgeneral functions. I haven't gotten around to solving this issue yet. Doug [1] https://github.com/d-torrance/dockapps/tree/update-wmbiff -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 01/14] wmkeys compilation bugs
Hi, I modified all other dockapps. The wmbiff dockapp includes a different wmgeneral library. This dockapp doesn't compile. I don't include this new code in libdockapps because include code of application that doesn't compile IMO is not a good idea. Probably we should try to compile the wmbiff dockapps, and then, think about include or not the three new functions in libdockapp. Cheers, kix "Rodolfo García Peñas (kix)" escribió: This patch solves a bug and a warning: - The dockapp wmkeys uses the getline function, that is the same function provided by stdio.h. This patch changes the function name to getline_wmkeys. - The main function returns void, and should return integer. This patch includes the return 0 at the function end and it changes the function prototype. Signed-off-by: Rodolfo García Peñas (kix) --- wmkeys/wmkeys.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wmkeys/wmkeys.c b/wmkeys/wmkeys.c index 718ccd5..72d98e7 100644 --- a/wmkeys/wmkeys.c +++ b/wmkeys/wmkeys.c @@ -94,7 +94,7 @@ void enable_configuration(int n); * Main */ -void main(int argc, char *argv[]) +int main(int argc, char *argv[]) { num_configs = 0; current_config = 0; @@ -105,6 +105,8 @@ void main(int argc, char *argv[]) read_config(); wmkeys_routine(argc, argv); + + return 0; } /* @@ -179,7 +181,7 @@ void draw_string(char* s) * getline() */ -int getline(FILE* pfile, char* s, int lim) +int getline_wmkeys(FILE* pfile, char* s, int lim) { int c = 0, i; for(i=0; i Rodolfo García Peñas (kix) http://www.kix.es/ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.