diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2000-02-27 11:54:37 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2000-02-27 11:54:37 +0000 |
commit | 7a0a491c10b60c2d06cf03f1069e71053174b2f6 (patch) | |
tree | d732b834c6efbb07c22523bef727e3a0930ac2dc /chinese/xcin25 | |
parent | Upgrade to latest version. (diff) |
Upgrade to latest version
PR: ports/16940
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=26352
Diffstat (limited to 'chinese/xcin25')
-rw-r--r-- | chinese/xcin25/Makefile | 8 | ||||
-rw-r--r-- | chinese/xcin25/distinfo | 2 | ||||
-rw-r--r-- | chinese/xcin25/files/patch-ad | 12 | ||||
-rw-r--r-- | chinese/xcin25/files/patch-af | 367 | ||||
-rw-r--r-- | chinese/xcin25/pkg-plist | 2 |
5 files changed, 379 insertions, 12 deletions
diff --git a/chinese/xcin25/Makefile b/chinese/xcin25/Makefile index 819f0a5427f4..45093e0bdd2d 100644 --- a/chinese/xcin25/Makefile +++ b/chinese/xcin25/Makefile @@ -1,13 +1,13 @@ # New ports collection makefile for: xcin25 -# Version required: xcin-2.5.2b4 +# Version required: xcin-2.5.2-p2 # Date created: 18 Oct 1999 # Whom: Keith Jang <keith@freebsd.sinica.edu.tw> # # $FreeBSD$ # -DISTNAME= xcin-2.5-19991128 -PKGNAME= zh-xcin-2.5.2b4 +DISTNAME= xcin-2.5.2-pre2 +PKGNAME= zh-xcin-2.5.2p2 CATEGORIES= chinese x11 MASTER_SITES= ftp://xcin.linux.org.tw/pub/xcin/xcin/devel/ @@ -41,7 +41,7 @@ post-install: ${INSTALL_MAN} ${WRKSRC}/doc/${DOC} ${PREFIX}/lib/X11/xcin25/doc .endfor ${MKDIR} ${PREFIX}/lib/X11/xcin25/doc/internal -.for INTERNAL in IMdkit gen_inp gui_request module structer +.for INTERNAL in IMdkit gen_inp greq_menusel module structer ${INSTALL_MAN} ${WRKSRC}/doc/internal/${INTERNAL} \ ${PREFIX}/lib/X11/xcin25/doc/internal .endfor diff --git a/chinese/xcin25/distinfo b/chinese/xcin25/distinfo index 7848f7b0aaaf..273d9dd460c8 100644 --- a/chinese/xcin25/distinfo +++ b/chinese/xcin25/distinfo @@ -1 +1 @@ -MD5 (xcin-2.5-19991128.tar.gz) = 5d2d760a7261c317ded991ddb22a1106 +MD5 (xcin-2.5.2-pre2.tar.gz) = 9a0c961068778ca9f33f9bcb71d33550 diff --git a/chinese/xcin25/files/patch-ad b/chinese/xcin25/files/patch-ad index 9f4c0c5b186b..3bf52a7724b4 100644 --- a/chinese/xcin25/files/patch-ad +++ b/chinese/xcin25/files/patch-ad @@ -1,11 +1,11 @@ ---- src/Makefile.in.orig Sat Dec 18 15:40:46 1999 -+++ src/Makefile.in Sat Dec 18 15:41:05 1999 -@@ -47,7 +47,7 @@ +--- src/Makefile.in.orig Sun Feb 27 02:12:52 2000 ++++ src/Makefile.in Sun Feb 27 02:12:58 2000 +@@ -45,7 +45,7 @@ LIB = -lm ${x_libraries} ${extra_lib} ${locale_lib} ${dl_lib} ${intl_lib} \ ${xcinlib} -lXimd -lim_comm -lxcintool -lsiod ${socket_lib} -BIN = xcin +BIN = xcin2.5 - SRC = xcin_main.c module.c gui.c xim.c xim_IC.c fkey.c gui_menusel.c - OBJ = xcin_main.o module.o gui.o xim.o xim_IC.o fkey.o gui_menusel.o - SUBSYS = lib Cinput + SRC = xcin_main.c module.c gui.c xim.c xim_IC.c fkey.c gui_main.c \ + gui_menusel.c gui_overspot.c + OBJ = xcin_main.o module.o gui.o xim.o xim_IC.o fkey.o gui_main.o \ diff --git a/chinese/xcin25/files/patch-af b/chinese/xcin25/files/patch-af new file mode 100644 index 000000000000..e7cd753ebdbe --- /dev/null +++ b/chinese/xcin25/files/patch-af @@ -0,0 +1,367 @@ +--- src/include/gui.h.orig Wed Feb 23 09:47:57 2000 ++++ src/include/gui.h Thu Feb 24 01:55:36 2000 +@@ -30,6 +30,7 @@ + */ + #define WIN_CHANGE_IM_CONTENT 0x0001 + #define WIN_CHANGE_IM 0x00ff ++#define WIN_CHANGE_FOCUS 0x0100 + + /* + * Window Identifier. +--- src/include/xcin_core.h.orig Wed Feb 23 09:47:57 2000 ++++ src/include/xcin_core.h Thu Feb 24 01:55:36 2000 +@@ -88,7 +88,7 @@ + + /* XIM & Input Method configuration. */ + XIMS ims; +- IC *ic; ++ IC *ic, *icp; + xmode_t xcin_mode; + inp_state_t default_im; + inp_state_t default_im_sinmd; +--- src/gui.c.orig Wed Feb 23 09:47:57 2000 ++++ src/gui.c Thu Feb 24 01:55:36 2000 +@@ -191,31 +191,19 @@ + return; + + if (state) { +- if (! win->winmap) { ++ if (win->winmap == (ubyte_t)0) { + XMapWindow(gui->display, win->window); + win->winmap = (byte_t)1; + } + } + else { +- if (win->winmap) { ++ if (win->winmap == (ubyte_t)1) { + XUnmapWindow(gui->display, win->window); + win->winmap = (byte_t)0; + } + } + } + +-void +-gui_greq_winmap_change(gui_t *gui, greq_win_t *greqw, int state) +-{ +- winlist_t *w; +- int i; +- +- for (i=0; i<greqw->n_greq; i++) { +- w = (winlist_t *)(greqw->win[i]); +- gui_winmap_change(gui, w, state); +- } +-} +- + void + gui_greq_win_destroy(greq_win_t *greqw) + { +@@ -229,22 +217,6 @@ + } + + void +-gui_overspot_winmap_change(gui_t *gui, int imid, int state) +-{ +- winlist_t *w = xccore->win; +- +- while (w) { +- if (w->imid == imid && w->wid == WID_OVERSPOT) { +- gui_winmap_change(gui, w, state); +- if (state == 1) +- XRaiseWindow(gui->display, w->window); +- break; +- } +- w = w->next; +- } +-} +- +-void + gui_overspot_destroy(int imid) + { + winlist_t *w = xccore->win; +@@ -351,6 +323,20 @@ + return win; + } + ++static void ++gui_greq_windraw(gui_t *gui, greq_win_t *greqw, int state) ++{ ++ winlist_t *w; ++ int i; ++ ++ for (i=0; i<greqw->n_greq; i++) { ++ w = (winlist_t *)(greqw->win[i]); ++ gui_winmap_change(gui, w, state); ++ if (state) ++ w->win_draw_func(&(xccore->gui), w); ++ } ++} ++ + static void + update_gui_request(void) + { +@@ -360,6 +346,13 @@ + greq_win_t gw_handling; + int i, j; + ++ if ((xccore->gui.winchange & WIN_CHANGE_FOCUS) && xccore->icp) { ++ greq_win_t *greqw = &(xccore->icp->imc->gwin); ++ for (i=0; i<greqw->n_greq; i++) { ++ win = (winlist_t *)(greqw->win[i]); ++ gui_winmap_change(&(xccore->gui), win, 0); ++ } ++ } + if (! greqd && imc->gwin.n_greq == 0) + return; + +@@ -384,14 +377,11 @@ + gw_handling.win[gw_handling.n_greq] = imc->gwin.win[i]; + (gw_handling.n_greq) ++; + +- if ((win = search_winlist(xccore->win, WID_GUIREQ, +- imc->id, greqd->reqid))) +- win->win_draw_func(&(xccore->gui), win); +- else { +- if ((win=gui_request_init(imc, greqd))) { +- xccore->win_end->next = win; +- xccore->win_end = win; +- } ++ if (! search_winlist(xccore->win, ++ WID_GUIREQ, imc->id, greqd->reqid) && ++ (win=gui_request_init(imc, greqd))) { ++ xccore->win_end->next = win; ++ xccore->win_end = win; + } + } + greqd = greqd->next; +@@ -407,15 +397,13 @@ + } + memcpy(&(imc->gwin), &(gw_handling), sizeof(greq_win_t)); + +- if ((xccore->xcin_mode & XCIN_SINGLE_IMC)) { ++// if ((xccore->xcin_mode & XCIN_SINGLE_IMC)) { + if (! xccore->ic || !(xccore->ic->imc->inp_state & IM_CINPUT) || +- !(xccore->ic->imc->inp_state & IM_XIMFOCUS)) { +- gui_greq_winmap_change(&(xccore->gui), &(imc->gwin), 0); +- return; +- } ++ !(xccore->ic->imc->inp_state & IM_XIMFOCUS)) ++ gui_greq_windraw(&(xccore->gui), &(imc->gwin), 0); + else +- gui_greq_winmap_change(&(xccore->gui), &(imc->gwin), 1); +- } ++ gui_greq_windraw(&(xccore->gui), &(imc->gwin), 1); ++// } + } + + /*--------------------------------------------------------------------------*/ +@@ -425,16 +413,17 @@ + update_gui_overspot(void) + { + winlist_t *win; +- IC *ic = xccore->ic; ++ IC *ic = xccore->ic, *icp = xccore->icp; + +- if (ic->imc->pre_attr == NULL) +- ic->imc->pre_attr = &(ic->pre_attr); +- if (ic->imc->sts_attr == NULL) +- ic->imc->sts_attr = &(ic->sts_attr); ++ if ((xccore->gui.winchange & WIN_CHANGE_FOCUS) && icp && ++ (win = search_winlist(xccore->win, WID_OVERSPOT, icp->imc->id, 0))) ++ gui_winmap_change(&(xccore->gui), win, 0); + + if ((win = search_winlist(xccore->win, WID_OVERSPOT, ic->imc->id, 0))) + win->win_draw_func(&(xccore->gui), win); + else { ++ ic->imc->pre_attr = &(ic->pre_attr); ++ ic->imc->sts_attr = &(ic->sts_attr); + win = gui_overspot_init(&(xccore->gui), xccore->main_win, ic->imc); + xccore->win_end->next = win; + xccore->win_end = win; +--- src/gui_menusel.c.orig Wed Feb 23 09:47:57 2000 ++++ src/gui_menusel.c Thu Feb 24 01:55:36 2000 +@@ -246,18 +246,21 @@ + XSetWMProtocols(gui->display, win->window, &(gui->wm_del_win), 1); + + /* Setup GC */ +- msw.gc = XCreateGC(gui->display, win->window, 0, NULL); +- XSetForeground(gui->display, msw.gc, gui->fg_color); +- XSetBackground(gui->display, msw.gc, gui->bg_color); +- +- msw.gcm = XCreateGC(gui->display, win->window, 0, NULL); +- XSetForeground(gui->display, msw.gcm, gui->fg_color); +- XSetBackground(gui->display, msw.gcm, gui->mbg_color); +- +- msw.gcline = XCreateGC(gui->display, win->window, 0, NULL); +- XSetForeground(gui->display, msw.gcline, gui->grid_color); +- XSetBackground(gui->display, msw.gcline, gui->bg_color); +- ++ if (msw.gc == (GC)0) { ++ msw.gc = XCreateGC(gui->display, win->window, 0, NULL); ++ XSetForeground(gui->display, msw.gc, gui->fg_color); ++ XSetBackground(gui->display, msw.gc, gui->bg_color); ++ } ++ if (msw.gcm == (GC)0) { ++ msw.gcm = XCreateGC(gui->display, win->window, 0, NULL); ++ XSetForeground(gui->display, msw.gcm, gui->fg_color); ++ XSetBackground(gui->display, msw.gcm, gui->mbg_color); ++ } ++ if (msw.gcline == (GC)0) { ++ msw.gcline = XCreateGC(gui->display, win->window, 0, NULL); ++ XSetForeground(gui->display, msw.gcline, gui->grid_color); ++ XSetBackground(gui->display, msw.gcline, gui->bg_color); ++ } + gui_winmap_change(gui, win, 1); + gui_menusel_draw(gui, win); + return win; +--- src/gui_overspot.c.orig Wed Feb 23 09:47:57 2000 ++++ src/gui_overspot.c Thu Feb 24 01:55:36 2000 +@@ -175,8 +175,7 @@ + if ((imc->inp_state & IM_XIMFOCUS) && (imc->inp_state & IM_CINPUT) && + (imc->inpinfo.n_mcch > 0 || + (imc->inpinfo.s_keystroke && imc->inpinfo.s_keystroke[0].wch))) { +- if (! win->winmap) +- XRaiseWindow(gui->display, win->window); ++ XRaiseWindow(gui->display, win->window); + overspot_win_location(gui, win, imc); + gui_winmap_change(gui, win, 1); + overspot_win_draw(gui, win, imc); +@@ -225,18 +224,21 @@ + XSelectInput(gui->display, win->window, (ExposureMask|StructureNotifyMask)); + + /* Setup GC */ +- osw.gc = XCreateGC(gui->display, win->window, 0, NULL); +- XSetForeground(gui->display, osw.gc, gui->fg_color); +- XSetBackground(gui->display, osw.gc, gui->bg_color); +- +- osw.gcs = XCreateGC(gui->display, win->window, 0, NULL); +- XSetForeground(gui->display, osw.gcs, gui->fg_color); +- XSetBackground(gui->display, osw.gcs, gui->mbg_color); +- +- osw.gcm = XCreateGC(gui->display, win->window, 0, NULL); +- XSetForeground(gui->display, osw.gcm, gui->mfg_color); +- XSetBackground(gui->display, osw.gcm, gui->mbg_color); +- ++ if (osw.gc == (GC)0) { ++ osw.gc = XCreateGC(gui->display, win->window, 0, NULL); ++ XSetForeground(gui->display, osw.gc, gui->fg_color); ++ XSetBackground(gui->display, osw.gc, gui->bg_color); ++ } ++ if (osw.gcs == (GC)0) { ++ osw.gcs = XCreateGC(gui->display, win->window, 0, NULL); ++ XSetForeground(gui->display, osw.gcs, gui->fg_color); ++ XSetBackground(gui->display, osw.gcs, gui->mbg_color); ++ } ++ if (osw.gcm == (GC)0) { ++ osw.gcm = XCreateGC(gui->display, win->window, 0, NULL); ++ XSetForeground(gui->display, osw.gcm, gui->mfg_color); ++ XSetBackground(gui->display, osw.gcm, gui->mbg_color); ++ } + gui_overspot_draw(gui, win); + return win; + } +--- src/xim.c.orig Wed Feb 23 09:47:57 2000 ++++ src/xim.c Thu Feb 24 01:55:36 2000 +@@ -165,12 +165,11 @@ + + if (imc->icid != ic->id) + return; +- xccore->ic = ic; + if ((imc->inp_state & IM_CINPUT)) { + imc->inp_state |= IM_XIMFOCUS; + xccore->gui.winchange |= WIN_CHANGE_IM; + } +- else if (imc->inp_state & IM_2BYTES) ++ else if ((imc->inp_state & IM_2BYTES)) + xccore->gui.winchange |= WIN_CHANGE_IM; + } + +@@ -460,6 +459,7 @@ + ic->imc->icid = ic->id; + call_switch_in(ic); + ic->ic_state |= IC_FOCUS; ++ xccore->ic = ic; + + if ((ic->ic_state & IC_NEWIC)) { + if ((xccore->xcin_mode & XCIN_RUN_IM_FOCUS) || +@@ -484,23 +484,8 @@ + ic->imc->sts_attr = &(ic->sts_attr); + } + } +- else { +-/* +- * For XCIN_SINGLE_IMC off, we should change the GUI-request windows' mapping +- * state everytime when changing the IC focus, since the focus status in this +- * mode is definite, and each IC is completely independent to the others, so +- * we should handle them independently. +- * +- * But for XCIN_SINGLE_IMC mode, the focus state of IMC might be ambiguous, +- * as described on the above, so we will change the GUI-request windows' +- * mapping state after all the focus status are determined, i.e., in the +- * update_gui_request() in gui.c. This way can also improve the graphical +- * performance. +- */ +- gui_greq_winmap_change(&(xccore->gui), &(ic->imc->gwin), 1); +- if (ic->input_style == XIMSTY_OverSpot) +- gui_overspot_winmap_change(&(xccore->gui), ic->imc->id, 1); +- } ++ else ++ xccore->gui.winchange |= WIN_CHANGE_FOCUS; + return True; + } + +@@ -517,12 +502,10 @@ + return False; + + call_switch_out(ic); ++ xccore->icp = ic; + ic->ic_state &= ~(IC_FOCUS); +- if (! (xccore->xcin_mode & XCIN_SINGLE_IMC)) { +- gui_greq_winmap_change(&(xccore->gui), &(ic->imc->gwin), 0); +- if (ic->input_style == XIMSTY_OverSpot) +- gui_overspot_winmap_change(&(xccore->gui), ic->imc->id, 0); +- } ++ if (! (xccore->xcin_mode & XCIN_SINGLE_IMC)) ++ xccore->gui.winchange |= WIN_CHANGE_FOCUS; + return True; + } + +@@ -962,12 +945,15 @@ + { + IMSyncXlibStruct pass_data; + +- xim_disconnect(xccore->ic); + xccore->xcin_mode |= (XCIN_RUN_EXIT | XCIN_ICCHECK_OFF); +- +- pass_data.major_code = XIM_SYNC; +- pass_data.minor_code = 0; +- pass_data.connect_id = xccore->ic->connect_id; +- pass_data.icid = xccore->ic->id; +- IMSyncXlib(xccore->ims, (XPointer)&pass_data); ++ if (xccore->ic) { ++ xim_disconnect(xccore->ic); ++ pass_data.major_code = XIM_SYNC; ++ pass_data.minor_code = 0; ++ pass_data.connect_id = xccore->ic->connect_id; ++ pass_data.icid = xccore->ic->id; ++ IMSyncXlib(xccore->ims, (XPointer)&pass_data); ++ } ++ else ++ exit(0); + } +--- doc/Changes.orig Wed Feb 23 09:47:57 2000 ++++ doc/Changes Thu Feb 24 01:55:36 2000 +@@ -1,3 +1,14 @@ ++xcin-2.5.2-pre3: 2000/03/ ++------------------------------ ++1. Fix the bug of multiply creating GC in gui_overspot & gui_menusel. ++ Thanks to Peter Hung <peter@phantom.wahoo.com.tw> ++ ++2. Fix bugs when xcin is going to exit and xccore->ic = NULL case; ++ ++3. Change the mechanism of IMC windows' map change during IC focus changes. ++ Add a gui->winchange flag: WIN_CHANGE_FOCUS. ++ ++ + xcin-2.5.2-pre2: 2000/02/23 + ------------------------------ + 1. Register a WM protocol into testprog such that it can be terminated by WM. diff --git a/chinese/xcin25/pkg-plist b/chinese/xcin25/pkg-plist index 75b72b867e65..c1156b78fc65 100644 --- a/chinese/xcin25/pkg-plist +++ b/chinese/xcin25/pkg-plist @@ -19,7 +19,7 @@ lib/X11/xcin25/doc/Usage lib/X11/xcin25/doc/UserGuide lib/X11/xcin25/doc/internal/IMdkit lib/X11/xcin25/doc/internal/gen_inp -lib/X11/xcin25/doc/internal/gui_request +lib/X11/xcin25/doc/internal/greq_menusel lib/X11/xcin25/doc/internal/module lib/X11/xcin25/doc/internal/structer lib/X11/xcin25/doc/modules/bimsphone |