From 0ba7ae448f113581dba03718a09688a2fbc11bfc Mon Sep 17 00:00:00 2001 From: id Date: Wed, 26 May 1999 23:18:34 +0000 Subject: [PATCH] Modelock relate stuffs. --- src/def_pixmaps.h | 66 +---------------------------------------------- src/framewin.c | 24 +++++++++++------ src/framewin.h | 4 +++ src/wconfig.h.in | 7 ++++- src/window.c | 5 +++- 5 files changed, 31 insertions(+), 75 deletions(-) diff --git a/src/def_pixmaps.h b/src/def_pixmaps.h index 49e8f1f1..5e05b70d 100644 --- a/src/def_pixmaps.h +++ b/src/def_pixmaps.h @@ -98,71 +98,7 @@ static char *PRED_ICONIFY_XPM[] = { }; #ifdef XKB_BUTTON_HINT - -static char *PRED_XKBGROUP1_XPM[] = { -" 10 10 2 1", -". c #000000", -"# c None", -"........##", -".......###", -"..########", -"..########", -"......####", -".....#####", -"..########", -"..########", -"........##", -"........##" -}; - -static char *PRED_XKBGROUP2_XPM[] = { -" 10 10 2 1", -". c #000000", -"# c None", -"#..###..##", -".#..#.#..#", -".#...###..", -"#...####..", -"##..####..", -"##..####..", -"##..####..", -"##..####..", -"##..####..", -"##.#####.#" -}; - -static char *PRED_XKBGROUP3_XPM[] = { -" 10 10 2 1", -". c #000000", -"# c None", -"..........", -"..........", -"..##..##..", -"..##..##..", -"..........", -"..........", -"..######..", -"...####...", -"....##....", -".........." -}; - -static char *PRED_XKBGROUP4_XPM[] = { -" 10 10 2 1", -". c #000000", -"# c None", -"..........", -".########.", -".#..##..#.", -".#..##..#.", -".########.", -".#......#.", -".##....##.", -".###..###.", -".########.", -".........." -}; - +#include "extend_pixmaps.h" #endif /* XKB_BUTTON_HINT */ diff --git a/src/framewin.c b/src/framewin.c index 8ff9c2ab..a5aa87df 100644 --- a/src/framewin.c +++ b/src/framewin.c @@ -1260,6 +1260,16 @@ wFrameWindowUpdatePushButton(WFrameWindow *fwin, Bool pushed) #endif /* OLWM_HINTS */ +#ifdef XKB_BUTTON_HINT +void +wFrameWindowUpdateLanguageButton(WFrameWindow *fwin) +{ + paintButton(fwin->language_button, fwin->title_texture[fwin->flags.state], + fwin->title_pixel[fwin->flags.state], + fwin->languagebutton_image, True); +} +#endif /* XKB_BUTTON_HINT */ + /*********************************************************************/ @@ -1421,21 +1431,19 @@ handleButtonExpose(WObjDescriptor *desc, XEvent *event) #ifdef XKB_BUTTON_HINT if (button == fwin->language_button) { - if (wPreferences.modelock){ paintButton(button, fwin->title_texture[fwin->flags.state], - fwin->title_pixel[fwin->flags.state], - fwin->languagebutton_image, False); + fwin->title_pixel[fwin->flags.state], + fwin->languagebutton_image, False); } } else #endif - if (button == fwin->left_button) { - paintButton(button, fwin->title_texture[fwin->flags.state], - fwin->title_pixel[fwin->flags.state], - fwin->lbutton_image, False); + paintButton(button, fwin->title_texture[fwin->flags.state], + fwin->title_pixel[fwin->flags.state], + fwin->lbutton_image, False); } else { - Bool pushed = False; + Bool pushed = False; #ifdef OLWM_HINTS if (fwin->flags.right_button_pushed_in) diff --git a/src/framewin.h b/src/framewin.h index 2e1a5a58..a34c9688 100644 --- a/src/framewin.h +++ b/src/framewin.h @@ -180,4 +180,8 @@ int wFrameWindowChangeTitle(WFrameWindow *fwin, char *new_title); void wFrameWindowUpdatePushButton(WFrameWindow *fwin, Bool pushed); #endif +#ifdef XKB_BUTTON_HINT +void wFrameWindowUpdateLanguageButton(WFrameWindow *fwin); +#endif + #endif diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 5006e94a..e1049e25 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -244,6 +244,10 @@ *-------------------------------------------------------------------- */ +#if defined(GNOME_STUFF) && !defined(XDND) +#define XDND +#endif + /* list of paths to look for the config files, searched in order * of appearance */ #define DEF_CONFIG_PATHS \ @@ -596,7 +600,8 @@ * in def_pixmaps.h and default icon is now for Thai language only. * More icons are welcome. */ -#undef XKB_BUTTON_HINT +#define XKB_BUTTON_HINT +#undef LANGUAGE_TH #endif #ifndef DEMATERIALIZE_ICON diff --git a/src/window.c b/src/window.c index 06d4f682..a01448dc 100644 --- a/src/window.c +++ b/src/window.c @@ -2852,8 +2852,11 @@ windowLanguageClick(WCoreWindow *sender, void *data, XEvent *event) tl = wwin->frame->languagemode; wwin->frame->languagemode = wwin->frame->last_languagemode; wwin->frame->last_languagemode = tl; - wFrameWindowPaint(fwin); wSetFocusTo(scr, wwin); + wwin->frame->languagebutton_image = + wwin->frame->screen_ptr->b_pixmaps[WBUT_XKBGROUP1 + + wwin->frame->languagemode]; + wFrameWindowUpdateLanguageButton(wwin->frame); if (event->xbutton.button == Button3) return; wRaiseFrame(fwin->core);