diff options
author | ecolinux | 2015-06-08 15:36:55 +0200 |
---|---|---|
committer | ecolinux | 2015-06-08 15:36:55 +0200 |
commit | 5aed3bcd35055ceb088c9e03d8d1ca3e5493b79f (patch) | |
tree | a5793bc6cabfa566bafd49240a2d37a626b2cf7e | |
download | aur-fvwm+.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 70 | ||||
-rw-r--r-- | 01-TranslucentMenus.patch | 500 | ||||
-rw-r--r-- | 02-ColourBorders.patch | 1614 | ||||
-rw-r--r-- | 03-ResizeOutlineThin.patch | 638 | ||||
-rw-r--r-- | 04-Conditionals.patch | 41 | ||||
-rw-r--r-- | 05-FlatSeparators.patch | 170 | ||||
-rw-r--r-- | 06-BorderUnderTitle.patch | 210 | ||||
-rw-r--r-- | 07-InactiveFont.patch | 340 | ||||
-rw-r--r-- | 08-FluxRoundedCorners.patch | 864 | ||||
-rw-r--r-- | 09-TopBorder.patch | 193 | ||||
-rw-r--r-- | 10-ButtonWidth.patch | 25 | ||||
-rw-r--r-- | 11-MultiBorder.patch | 542 | ||||
-rw-r--r-- | 12-FvwmButtonsTips.patch | 318 | ||||
-rw-r--r-- | 13-FvwmIconMan.patch | 114 | ||||
-rw-r--r-- | 14-Hover.patch | 294 | ||||
-rw-r--r-- | 15-FirstItemUnderPointer.patch | 17 | ||||
-rw-r--r-- | 16-ThinGeometryProxy.patch | 30 | ||||
-rw-r--r-- | PKGBUILD | 151 | ||||
-rw-r--r-- | configure.ac-makefile.am.patch | 396 | ||||
-rw-r--r-- | fvwm+.desktop | 7 |
20 files changed, 6534 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e6946db229dc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,70 @@ +# Generated by makepkg 4.2.1 +# Mon Jun 8 13:26:29 UTC 2015 +pkgbase = fvwm+ + pkgdesc = A powerful ICCCM2 compliant multiple virtual desktop window manager for X11 with some patchs + pkgver = 2.6.5 + pkgrel = 5 + url = http://www.fvwm.org + arch = i686 + arch = x86_64 + license = GPL + license = custom + depends = imlib + depends = fribidi + depends = perl + depends = libstroke + depends = libxpm + depends = libxinerama + depends = readline + depends = libxft + depends = librsvg + depends = libxcursor + provides = fvwm + conflicts = fvwm + conflicts = fvwm-patched + conflicts = fvwm+-cvs + conflicts = fvwm-cvs + replaces = fvwm + options = !emptydirs + options = !makeflags + source = ftp://ftp.fvwm.org/pub/fvwm/version-2/fvwm-2.6.5.tar.bz2 + source = fvwm+.desktop + source = configure.ac-makefile.am.patch + source = 01-TranslucentMenus.patch + source = 02-ColourBorders.patch + source = 03-ResizeOutlineThin.patch + source = 04-Conditionals.patch + source = 05-FlatSeparators.patch + source = 06-BorderUnderTitle.patch + source = 07-InactiveFont.patch + source = 08-FluxRoundedCorners.patch + source = 09-TopBorder.patch + source = 10-ButtonWidth.patch + source = 11-MultiBorder.patch + source = 12-FvwmButtonsTips.patch + source = 13-FvwmIconMan.patch + source = 14-Hover.patch + source = 15-FirstItemUnderPointer.patch + source = 16-ThinGeometryProxy.patch + md5sums = 090ba4e0c517e8b94f71317951530f69 + md5sums = a12c52729a74355838404ee2f5716e0c + md5sums = 4f0f03f70e058c7b67390e8f1fa7eb25 + md5sums = d208dc6531e2e6a226fb063d007d6046 + md5sums = 23b47a21958455fbd0d9d6011b39d009 + md5sums = 01e4a4cee7780315a275b4428802c49f + md5sums = 128c6a2d62a15e5fe95f0a3d1c2033b3 + md5sums = 209e2c1fa66bc5b502fba2cbe3a04f8a + md5sums = 86b6c187be636c0543058f48856b5fb0 + md5sums = 1cceee901466d34953910bd598332d2f + md5sums = e053d2f34f527a62831563e26b7cdeb7 + md5sums = 037562c2c0eb82bc35d1b5b55098f2fc + md5sums = 2541576d57ead08ce9772bb219f73f67 + md5sums = ce8d47eea51abe0b594a42d17602b574 + md5sums = c42763877b543c0bcb78a88460671b58 + md5sums = d79ef23cbd62c647ea8d85526f0f2b17 + md5sums = 09388c4a2f4c86d6e0862e313f2fec86 + md5sums = e4ed5f774e775c67d16f5be8e9783b52 + md5sums = a552a1a273a9fa015271bed929cd275a + +pkgname = fvwm+ + diff --git a/01-TranslucentMenus.patch b/01-TranslucentMenus.patch new file mode 100644 index 000000000000..126b8a1cb16c --- /dev/null +++ b/01-TranslucentMenus.patch @@ -0,0 +1,500 @@ +diff -U3 -r fvwm/colorset.c fvwm/colorset.c +--- fvwm/colorset.c 2010-04-28 18:55:22.000000000 +0200 ++++ fvwm/colorset.c 2011-12-09 18:11:15.995378109 +0100 +@@ -165,6 +165,8 @@ + "NoIconTint", + "IconAlpha", + ++ "Translucent", ++ "NoTranslucent", + NULL + }; + +@@ -626,6 +628,7 @@ + char *fg_tint = NULL; + char *bg_tint = NULL; + char *icon_tint = NULL; ++ char *translucent_tint = NULL; + Bool have_pixels_changed = False; + Bool has_icon_pixels_changed = False; + Bool has_fg_changed = False; +@@ -638,6 +641,7 @@ + Bool has_fg_tint_changed = False; + Bool has_bg_tint_changed = False; + Bool has_icon_tint_changed = False; ++ Bool has_translucent_tint_changed = False; + Bool has_pixmap_changed = False; + Bool has_shape_changed = False; + Bool has_image_alpha_changed = False; +@@ -765,6 +769,10 @@ + case 21: /* Plain */ + has_pixmap_changed = True; + free_colorset_background(cs, True); ++ cs->is_translucent = False; ++ cs->translucent_tint_percent = 0; ++ cs->color_flags &= ~TRANSLUCENT_TINT_SUPPLIED; ++ has_translucent_tint_changed = True; + break; + case 22: /* NoShape */ + has_shape_changed = True; +@@ -931,6 +939,24 @@ + cs->icon_alpha_percent = tmp; + } + break; ++ case 42: /* Translucent */ ++ cs->is_translucent = True; ++ parse_simple_tint( ++ cs, args, &translucent_tint, ++ TRANSLUCENT_TINT_SUPPLIED, ++ &has_translucent_tint_changed, &percent, ++ "Translucent"); ++ if (has_translucent_tint_changed) ++ { ++ cs->translucent_tint_percent = percent; ++ } ++ break; ++ case 43: /* NoTranslucent */ ++ cs->is_translucent = False; ++ cs->translucent_tint_percent = 0; ++ cs->color_flags &= ~TRANSLUCENT_TINT_SUPPLIED; ++ has_translucent_tint_changed = True; ++ break; + default: + /* test for ?Gradient */ + if (option[0] && StrEquals(&option[1], "Gradient")) +@@ -1634,6 +1660,27 @@ + } + + /* ++ * ---------- change the translucent tint colour ---------- ++ */ ++ if (has_translucent_tint_changed) ++ { ++ /* user specified colour */ ++ if (translucent_tint != NULL) ++ { ++ PictureFreeColors( ++ dpy, Pcmap, &cs->translucent_tint, 1, 0, True); ++ cs->translucent_tint = GetColor(translucent_tint); ++ } ++ else ++ { ++ /* default */ ++ PictureFreeColors( ++ dpy, Pcmap, &cs->translucent_tint, 1, 0, True); ++ cs->translucent_tint = GetColor(black); ++ } ++ } ++ ++ /* + * ---------- send new colorset to fvwm and clean up ---------- + */ + /* make sure the server has this to avoid races */ +@@ -1729,6 +1776,7 @@ + ncs->fgsh = GetColor(white); + ncs->tint = GetColor(black); + ncs->icon_tint = GetColor(black); ++ ncs->translucent_tint = GetColor(black); + ncs->pixmap = XCreatePixmapFromBitmapData( + dpy, Scr.NoFocusWin, + &g_bits[4 * (nColorsets % 3)], 4, 4, +@@ -1746,6 +1794,7 @@ + ncs->fgsh = GetForeShadow(ncs->fg, ncs->bg); + ncs->tint = GetColor(black); + ncs->icon_tint = GetColor(black); ++ ncs->translucent_tint = GetColor(black); + } + ncs->fg_tint = ncs->bg_tint = GetColor(black); + /* set flags for fg contrast, bg average */ +@@ -1757,6 +1806,7 @@ + ncs->icon_alpha_percent = 100; + ncs->tint_percent = 0; + ncs->icon_tint_percent = 0; ++ ncs->translucent_tint_percent = 0; + ncs->fg_tint_percent = ncs->bg_tint_percent = 0; + ncs->dither = (PictureDitherByDefault())? True:False; + nColorsets++; +diff -U3 -r fvwm/menuroot.h fvwm/menuroot.h +--- fvwm/menuroot.h 2007-01-13 16:07:14.000000000 +0100 ++++ fvwm/menuroot.h 2011-12-09 18:11:15.998711359 +0100 +@@ -146,6 +146,9 @@ + int d_npixels; + } stored_pixels; + /* alloc pixels when dithering is used for gradients */ ++ /* x,y XMapRaise */ ++ int x; ++ int y; + } MenuRootDynamic; + + /* access macros to dynamic menu members */ +diff -U3 -r fvwm/menus.c fvwm/menus.c +--- fvwm/menus.c 2011-08-07 00:03:31.000000000 +0200 ++++ fvwm/menus.c 2011-12-09 18:11:15.998711359 +0100 +@@ -85,6 +85,19 @@ + #define SCTX_GET_MR(ctx) ((ctx).type == SCTX_MENU_ROOT ? \ + (ctx).menu_root.menu_root : NULL) + ++#define MENU_IS_TRANSLUCENT(mr,cs) \ ++ (!MR_IS_TEAR_OFF_MENU(mr) && CSET_IS_TRANSLUCENT(cs)) ++#define MENU_IS_TRANSPARENT(mr,cs) \ ++ (MENU_IS_TRANSLUCENT(mr,cs) || CSET_IS_TRANSPARENT(cs)) ++#define MR_IS_TRANSLUCENT_MENU(mr) \ ++ (!MR_IS_TEAR_OFF_MENU(mr) && MR_STYLE(mr) && \ ++ ST_HAS_MENU_CSET(MR_STYLE(mr)) && CSET_IS_TRANSLUCENT( \ ++ ST_CSET_MENU(MR_STYLE(mr)))) ++#define MR_IS_TRANSPARENT_MENU(mr) \ ++ (MR_IS_TRANSLUCENT_MENU(mr) || (MR_STYLE(mr) && \ ++ ST_HAS_MENU_CSET(MR_STYLE(mr)) && CSET_IS_TRANSPARENT( \ ++ ST_CSET_MENU(MR_STYLE(mr))))) ++ + /* ---------------------------- imports ------------------------------------ */ + + /* This external is safe. It's written only during startup. */ +@@ -227,6 +240,8 @@ + } mloop_static_info_t; + + /* ---------------------------- forward declarations ----------------------- */ ++static MenuRoot *seek_submenu_instance( ++ MenuRoot *parent_menu, MenuItem *parent_item); + + /* ---------------------------- local variables ---------------------------- */ + +@@ -392,12 +407,22 @@ + Bool transparent_bg = False; + + /* move it back */ +- if (ST_HAS_MENU_CSET(MR_STYLE(mr)) && +- CSET_IS_TRANSPARENT(ST_CSET_MENU(MR_STYLE(mr)))) ++ if (MR_IS_TRANSPARENT_MENU(mr)) + { + transparent_bg = True; + get_menu_repaint_transparent_parameters( + &mrtp, mr, fw); ++ if (MR_IS_TRANSLUCENT_MENU(mr) && MR_SUBMENU_ITEM(mr)) ++ { ++ MenuRoot *smr; ++ smr = seek_submenu_instance( ++ mr, MR_SUBMENU_ITEM(mr)); ++ if (smr) ++ { ++ /* just unmap it here, popdown later */ ++ XUnmapWindow(dpy, MR_WINDOW(smr)); ++ } ++ } + } + AnimatedMoveOfWindow( + MR_WINDOW(mr), act_x, act_y, act_x - MR_XANIMATION(mr), +@@ -1915,6 +1940,7 @@ + /* Doh. Use the standard display instead. */ + MR_CREATE_DPY(mr) = dpy; + } ++ MR_IS_TEAR_OFF_MENU(mr) = 1; + } + else + { +@@ -2719,7 +2745,37 @@ + } + MR_IS_PAINTED(mr) = 1; + /* paint the menu background */ +- if (ms && ST_HAS_MENU_CSET(ms)) ++ if (MR_IS_TRANSLUCENT_MENU(mr)) ++ { ++ Pixmap trans = None; ++ FvwmRenderAttributes fra; ++ colorset_t *colorset = &Colorset[ST_CSET_MENU(ms)]; ++ ++ fra.mask = 0; ++ if (colorset->translucent_tint_percent > 0) ++ { ++ fra.mask = FRAM_HAVE_TINT; ++ fra.tint = colorset->translucent_tint; ++ fra.tint_percent = colorset->translucent_tint_percent; ++ } ++ if (MR_IS_BACKGROUND_SET(mr) == False) ++ { ++ trans = PGraphicsCreateTranslucent( ++ dpy, MR_WINDOW(mr), &fra, ++ BACK_GC(ST_MENU_INACTIVE_GCS(ms)), ++ MR_X(mr), MR_Y(mr), MR_WIDTH(mr), MR_HEIGHT(mr)); ++ XMapRaised(dpy, MR_WINDOW(mr)); ++ if (trans != None) ++ { ++ XSetWindowBackgroundPixmap( ++ dpy, MR_WINDOW(mr), trans); ++ MR_IS_BACKGROUND_SET(mr) = True; ++ clear_expose_menu_area(MR_WINDOW(mr), pevent); ++ XFreePixmap(dpy, trans); ++ } ++ } ++ } ++ else if (ms && ST_HAS_MENU_CSET(ms)) + { + if (MR_IS_BACKGROUND_SET(mr) == False) + { +@@ -3526,10 +3582,7 @@ + MR_HAS_POPPED_UP_RIGHT(mr) = 0; + } + MR_XANIMATION(parent_menu) += end_x - prev_x; +- if (ST_HAS_MENU_CSET(MR_STYLE(parent_menu)) && +- CSET_IS_TRANSPARENT( +- ST_CSET_MENU( +- MR_STYLE(parent_menu)))) ++ if (MR_IS_TRANSPARENT_MENU(parent_menu)) + { + transparent_bg = True; + get_menu_repaint_transparent_parameters( +@@ -3708,10 +3761,21 @@ + */ + + XMoveWindow(dpy, MR_WINDOW(mr), x, y); ++ MR_X(mr) = x; ++ MR_Y(mr) = y; + XSelectInput(dpy, MR_WINDOW(mr), event_mask); +- XMapRaised(dpy, MR_WINDOW(mr)); +- if (popdown_window) +- XUnmapWindow(dpy, popdown_window); ++ if (MR_IS_TRANSLUCENT_MENU(mr)) ++ { ++ if (popdown_window) ++ XUnmapWindow(dpy, popdown_window); ++ paint_menu(mr, NULL, fw); ++ } ++ else ++ { ++ XMapRaised(dpy, MR_WINDOW(mr)); ++ if (popdown_window) ++ XUnmapWindow(dpy, popdown_window); ++ } + XFlush(dpy); + MR_MAPPED_COPIES(mr)++; + MST_USAGE_COUNT(mr)++; +@@ -6252,16 +6316,122 @@ + { + last = True; + } +- if (!last && CSET_IS_TRANSPARENT_PR_TINT(ST_CSET_MENU(ms))) ++ if (!last && ++ (CSET_IS_TRANSPARENT_PR_TINT(ST_CSET_MENU(ms)) || ++ MR_IS_TRANSLUCENT_MENU(mr))) + { + /* too slow ... */ + return; + } +- SetWindowBackgroundWithOffset( +- dpy, MR_WINDOW(mr), step_x - current_x, step_y - current_y, +- MR_WIDTH(mr), MR_HEIGHT(mr), +- &Colorset[ST_CSET_MENU(ms)], Pdepth, +- FORE_GC(MST_MENU_INACTIVE_GCS(mr)), False); ++ if (MR_IS_TRANSLUCENT_MENU(mr)) ++ { ++ Pixmap trans, tmp; ++ FvwmRenderAttributes fra; ++ colorset_t *colorset = &Colorset[ST_CSET_MENU(ms)]; ++ ++ fra.mask = 0; ++ if (colorset->translucent_tint_percent > 0) ++ { ++ fra.mask = FRAM_HAVE_TINT; ++ fra.tint = colorset->translucent_tint; ++ fra.tint_percent = colorset->translucent_tint_percent; ++ } ++ if (current_x == step_x) ++ { ++ /* Reuse the old pixmap for the part of the menu ++ * that has not moved. (This can be extended to get ++ * two new rectangles, one in each direction) ++ * ++ * It saves the unmapping of the window and makes ++ * Things less flickering. ++ */ ++ GC my_gc; ++ unsigned long valuemask = GCSubwindowMode; ++ XGCValues values; ++ int out_y=0; ++ values.subwindow_mode = IncludeInferiors; ++ if (step_y < 0) ++ { ++ out_y = -step_y; ++ } ++ trans = XCreatePixmap(dpy, MR_WINDOW(mr), MR_WIDTH(mr), ++ MR_HEIGHT(mr), Pdepth); ++ my_gc = fvwmlib_XCreateGC(dpy, MR_WINDOW(mr), 0, NULL); ++ XChangeGC(dpy, my_gc, valuemask, &values); ++ ++ XClearWindow(dpy, MR_WINDOW(mr)); ++ ++ if (current_y < step_y) ++ { ++ XCopyArea(dpy, MR_WINDOW(mr), trans, my_gc, 0, ++ step_y-current_y, MR_WIDTH(mr), ++ MR_HEIGHT(mr)-(step_y-current_y), ++ 0,0); ++ tmp = PGraphicsCreateTranslucent( ++ dpy, MR_WINDOW(mr), &fra, ++ BACK_GC(ST_MENU_INACTIVE_GCS(ms)), ++ current_x, current_y+MR_HEIGHT(mr), ++ MR_WIDTH(mr), step_y-current_y); ++ ++ XCopyArea(dpy, tmp, trans, my_gc, 0, 0, ++ MR_WIDTH(mr), step_y-current_y,0, ++ MR_HEIGHT(mr)-(step_y-current_y)); ++ } ++ else ++ { ++ XCopyArea(dpy, MR_WINDOW(mr), trans, my_gc, 0, ++ 0, MR_WIDTH(mr), ++ MR_HEIGHT(mr)-(current_y-step_y), 0, ++ current_y-step_y); ++ tmp = PGraphicsCreateTranslucent( ++ dpy, MR_WINDOW(mr), &fra, ++ BACK_GC(ST_MENU_INACTIVE_GCS(ms)), ++ current_x,step_y, MR_WIDTH(mr), ++ current_y-step_y); ++ XCopyArea(dpy, tmp, trans, my_gc, 0, 0, ++ MR_WIDTH(mr), current_y-step_y,0, ++ out_y); ++ } ++ MR_X(mr) = step_x; ++ MR_Y(mr) = step_y; ++ XFreePixmap(dpy, tmp); ++ XFreeGC(dpy,my_gc); ++ } ++ else ++ { ++ XUnmapWindow(dpy, MR_WINDOW(mr)); ++ MR_X(mr) = step_x; ++ MR_Y(mr) = step_y; ++ trans = PGraphicsCreateTranslucent( ++ dpy, MR_WINDOW(mr), &fra, ++ BACK_GC(ST_MENU_INACTIVE_GCS(ms)), ++ step_x, step_y, MR_WIDTH(mr), ++ MR_HEIGHT(mr)); ++ XMapRaised(dpy, MR_WINDOW(mr)); ++ } ++ XSetWindowBackgroundPixmap( ++ dpy, MR_WINDOW(mr), trans); ++ XFreePixmap(dpy, trans); ++ if (current_x == step_x) ++ { ++ /* Redraw the border */ ++ RelieveRectangle( ++ dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1, ++ MR_HEIGHT(mr) - 1, (Pdepth < 2) ? ++ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) : ++ HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)), ++ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), ++ MST_BORDER_WIDTH(mr)); ++ } ++ } ++ else ++ { ++ SetWindowBackgroundWithOffset( ++ dpy, MR_WINDOW(mr), step_x - current_x, ++ step_y - current_y, MR_WIDTH(mr), MR_HEIGHT(mr), ++ &Colorset[ST_CSET_MENU(ms)], Pdepth, ++ FORE_GC(MST_MENU_INACTIVE_GCS(mr)), False); ++ } + } + + +@@ -6302,10 +6472,7 @@ + } + if (!is_bg_set) + { +- SetWindowBackground( +- dpy, MR_WINDOW(mr), MR_WIDTH(mr), MR_HEIGHT(mr), +- &Colorset[ST_CSET_MENU(ms)], Pdepth, +- FORE_GC(MST_MENU_INACTIVE_GCS(mr)), False); ++ update_transparent_menu_bg(prtm, x, y, x, y, end_x, end_y); + } + /* redraw the background of non active item */ + for (mi = MR_FIRST_ITEM(mr); mi != NULL; mi = MI_NEXT_ITEM(mi)) +@@ -6929,10 +7096,12 @@ + SetWindowBackground( + dpy, MR_WINDOW(mr), MR_WIDTH(mr), + MR_HEIGHT(mr), +- &Colorset[ST_CSET_MENU(ms)], +- Pdepth, ++ &Colorset[ST_CSET_MENU(ms)], Pdepth, + FORE_GC(MST_MENU_INACTIVE_GCS(mr)), +- True); ++ False); ++ XClearArea( ++ dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr), ++ MR_HEIGHT(mr), True); + } + else if ((ST_HAS_ACTIVE_CSET(ms) && + ST_CSET_ACTIVE(ms) == cset) || +diff -U3 -r fvwm/menus.h fvwm/menus.h +--- fvwm/menus.h 2007-01-27 12:51:15.000000000 +0100 ++++ fvwm/menus.h 2011-12-09 18:11:16.002044610 +0100 +@@ -15,6 +15,9 @@ + #define IS_MENU_RETURN(x) \ + ((x)==MENU_DONE || (x)==MENU_ABORTED || (x)==MENU_SUBMENU_TORN_OFF) + ++#define MR_X(m) ((m)->d->x) ++#define MR_Y(m) ((m)->d->y) ++ + struct MenuRoot; + struct MenuStyle; + struct MenuReturn; +diff -U3 -r libs/Colorset.h libs/Colorset.h +--- libs/Colorset.h 2011-04-28 00:35:21.000000000 +0200 ++++ libs/Colorset.h 2011-12-09 18:11:16.002044610 +0100 +@@ -51,6 +51,10 @@ + Bool dither; + Bool allows_buffered_transparency; + Bool is_maybe_root_transparent; ++ /* only use by fvwm menu (non tear-off) */ ++ Bool is_translucent; ++ Pixel translucent_tint; ++ unsigned int translucent_tint_percent : 7; + #endif + } colorset_t; + +@@ -78,6 +82,7 @@ + #define FG_TINT_SUPPLIED 0x100 + #define BG_TINT_SUPPLIED 0x200 + #define ICON_TINT_SUPPLIED 0x400 ++#define TRANSLUCENT_TINT_SUPPLIED 0x800 + #endif + + /* colorsets are stored as an array of structs to permit fast dereferencing */ +@@ -153,6 +158,11 @@ + (cset != NULL && cset->pixmap == ParentRelative && \ + cset->tint_percent > 0) + ++#define CSET_IS_TRANSLUCENT(cset) \ ++ (cset >= 0 && Colorset[cset].is_translucent) ++#define CSETS_IS_TRANSLUCENT(cset) \ ++ (cset && cset->is_translucent) ++ + #ifndef FVWM_COLORSET_PRIVATE + /* Create n new colorsets, fvwm/colorset.c does its own thing (different size) + */ +diff -U3 -r libs/PictureGraphics.c libs/PictureGraphics.c +--- libs/PictureGraphics.c 2008-02-04 00:12:19.000000000 +0100 ++++ libs/PictureGraphics.c 2011-12-09 18:11:16.002044610 +0100 +@@ -1361,7 +1361,7 @@ + } + } + +-#if 0 /* humm... maybe useful one day with menus */ ++#if 1 /* humm... maybe useful one day with menus */ + Pixmap PGraphicsCreateTranslucent( + Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc, + int x, int y, int width, int height) +diff -U3 -r libs/PictureGraphics.h libs/PictureGraphics.h +--- libs/PictureGraphics.h 2006-05-09 22:46:29.000000000 +0200 ++++ libs/PictureGraphics.h 2011-12-09 18:11:16.002044610 +0100 +@@ -122,7 +122,9 @@ + Display *dpy, Window win, Pixel tint, int tint_percent, + Drawable dest, Bool dest_is_a_window, GC gc, GC mono_gc, GC alpha_gc, + int dest_x, int dest_y, int dest_w, int dest_h); +- ++Pixmap PGraphicsCreateTranslucent( ++ Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc, ++ int x, int y, int width, int height); + /* never used ! */ + Pixmap PGraphicsCreateDitherPixmap( + Display *dpy, Window win, Drawable src, Pixmap mask, int depth, GC gc, diff --git a/02-ColourBorders.patch b/02-ColourBorders.patch new file mode 100644 index 000000000000..dfcda12aee9f --- /dev/null +++ b/02-ColourBorders.patch @@ -0,0 +1,1614 @@ +diff -U3 -r fvwm/borders.c fvwm/borders.c +--- fvwm/borders.c 2011-08-07 00:03:31.000000000 +0200 ++++ fvwm/borders.c 2011-12-09 18:29:08.005127939 +0100 +@@ -124,14 +124,71 @@ + int relief_width; + GC relief_gc; + GC shadow_gc; ++ GC relief_gc_north; ++ GC shadow_gc_north; ++ GC relief_gc_south; ++ GC shadow_gc_south; ++ GC relief_gc_east; ++ GC shadow_gc_east; ++ GC relief_gc_west; ++ GC shadow_gc_west; ++ GC relief_gc_nw; ++ GC shadow_gc_nw; ++ GC relief_gc_ne; ++ GC shadow_gc_ne; ++ GC relief_gc_sw; ++ GC shadow_gc_sw; ++ GC relief_gc_se; ++ GC shadow_gc_se; ++ + Pixel fore_color; + Pixel back_color; +- int cs; ++ Pixel fore_color_north; ++ Pixel back_color_north; ++ Pixel fore_color_south; ++ Pixel back_color_south; ++ Pixel fore_color_east; ++ Pixel back_color_east; ++ Pixel fore_color_west; ++ Pixel back_color_west; ++ Pixel fore_color_nw; ++ Pixel back_color_nw; ++ Pixel fore_color_ne; ++ Pixel back_color_ne; ++ Pixel fore_color_sw; ++ Pixel back_color_sw; ++ Pixel fore_color_se; ++ Pixel back_color_se; ++ ++ int cs; ++ int cs_north; ++ int cs_south; ++ int cs_east; ++ int cs_west; + int border_cs; /* for UseBorderStyle */ ++ int border_cs_north; ++ int border_cs_south; ++ int border_cs_east; ++ int border_cs_west; ++ ++ int cs_nw; ++ int cs_ne; ++ int cs_sw; ++ int cs_se; + int bg_border_cs; /* for UseBorderStyle */ + Pixmap back_pixmap; +- XSetWindowAttributes attributes; +- unsigned long valuemask; ++ ++ XSetWindowAttributes attributes; ++ XSetWindowAttributes attributes_north; ++ XSetWindowAttributes attributes_ne; ++ XSetWindowAttributes attributes_nw; ++ XSetWindowAttributes attributes_sw; ++ XSetWindowAttributes attributes_se; ++ XSetWindowAttributes attributes_south; ++ XSetWindowAttributes attributes_east; ++ XSetWindowAttributes attributes_west; ++ ++ unsigned long valuemask; + Pixmap texture_pixmap; + int texture_pixmap_width; + int texture_pixmap_height; +@@ -329,10 +386,29 @@ + { + DecorFace *df; + color_quad *draw_colors; ++ color_quad *draw_colors_north; ++ color_quad *draw_colors_south; ++ color_quad *draw_colors_east; ++ color_quad *draw_colors_west; ++ ++ color_quad *draw_colors_nw; ++ color_quad *draw_colors_ne; ++ color_quad *draw_colors_sw; ++ color_quad *draw_colors_se; + + df = border_get_border_style(t, has_focus); + cd->bg_border_cs = -1; + cd->cs = -1; ++ cd->cs_north = -1; ++ cd->cs_south = -1; ++ cd->cs_east = -1; ++ cd->cs_west = -1; ++ ++ cd->cs_nw = -1; ++ cd->cs_ne = -1; ++ cd->cs_sw = -1; ++ cd->cs_se = -1; ++ + if (has_focus) + { + /* are we using textured borders? */ +@@ -356,11 +432,61 @@ + { + draw_colors = &(t->border_hicolors); + cd->cs = t->border_cs_hi; ++ ++ draw_colors_north = &(t->border_hicolors_north); ++ cd->cs_north = t->border_cs_hi_north; ++ ++ draw_colors_south = &(t->border_hicolors_south); ++ cd->cs_south = t->border_cs_hi_south; ++ ++ draw_colors_east = &(t->border_hicolors_east); ++ cd->cs_east = t->border_cs_hi_east; ++ ++ draw_colors_west = &(t->border_hicolors_west); ++ cd->cs_west = t->border_cs_hi_west; ++ ++ /* handles */ ++ draw_colors_nw = &(t->border_hicolors_handles_nw); ++ cd->cs_nw = t->border_cs_hi_handles_nw; ++ ++ draw_colors_ne = &(t->border_hicolors_handles_ne); ++ cd->cs_ne = t->border_cs_hi_handles_ne; ++ ++ draw_colors_sw = &(t->border_hicolors_handles_sw); ++ cd->cs_sw = t->border_cs_hi_handles_sw; ++ ++ draw_colors_se = &(t->border_hicolors_handles_se); ++ cd->cs_se = t->border_cs_hi_handles_se; + } + else + { + draw_colors = &(t->hicolors); + cd->cs = t->cs_hi; ++ ++ draw_colors_north = &(t->hicolors); ++ cd->cs_north = t->cs_hi; ++ ++ draw_colors_south = &(t->hicolors); ++ cd->cs_south = t->cs_hi; ++ ++ draw_colors_east = &(t->hicolors); ++ cd->cs_east = t->cs_hi; ++ ++ draw_colors_west = &(t->hicolors); ++ cd->cs_west = t->cs_hi; ++ ++ /* handles */ ++ draw_colors_nw = &(t->hicolors); ++ cd->cs_nw = t->cs_hi; ++ ++ draw_colors_ne = &(t->hicolors); ++ cd->cs_ne = t->cs_hi; ++ ++ draw_colors_sw = &(t->hicolors); ++ cd->cs_sw = t->cs_hi; ++ ++ draw_colors_se = &(t->hicolors); ++ cd->cs_se = t->cs_hi; + } + } + else +@@ -392,24 +518,167 @@ + { + draw_colors = &(t->border_colors); + cd->cs = t->border_cs; ++ ++ draw_colors_north = &(t->border_colors_north); ++ cd->cs_north = t->border_cs_north; ++ ++ draw_colors_south = &(t->border_colors_south); ++ cd->cs_south = t->border_cs_south; ++ ++ draw_colors_east = &(t->border_colors_east); ++ cd->cs_east = t->border_cs_east; ++ ++ draw_colors_west = &(t->border_colors_west); ++ cd->cs_west = t->border_cs_west; ++ ++ /* handles */ ++ draw_colors_nw = &(t->border_colors_handles_nw); ++ cd->cs_nw = t->border_cs_handles_nw; ++ ++ draw_colors_ne = &(t->border_colors_handles_ne); ++ cd->cs_ne = t->border_cs_handles_ne; ++ ++ draw_colors_sw = &(t->border_colors_handles_sw); ++ cd->cs_sw = t->border_cs_handles_sw; ++ ++ draw_colors_se = &(t->border_colors_handles_se); ++ cd->cs_se = t->border_cs_handles_se; ++ + } + else + { + draw_colors = &(t->colors); + cd->cs = t->cs; ++ ++ draw_colors_north = &(t->border_colors_north); ++ cd->cs_north = t->cs; ++ ++ draw_colors_south = &(t->border_colors_south); ++ cd->cs_south = t->cs; ++ ++ draw_colors_east = &(t->border_colors_east); ++ cd->cs_east = t->cs; ++ ++ draw_colors_west = &(t->border_colors_west); ++ cd->cs_west = t->cs; ++ ++ /* handles */ ++ draw_colors_nw = &(t->border_colors_handles_nw); ++ cd->cs_nw = t->border_cs_handles_nw; ++ ++ draw_colors_ne = &(t->border_colors_handles_ne); ++ cd->cs_ne = t->border_cs_handles_ne; ++ ++ draw_colors_sw = &(t->border_colors_handles_sw); ++ cd->cs_sw = t->border_cs_handles_sw; ++ ++ draw_colors_se = &(t->border_colors_handles_se); ++ cd->cs_se = t->border_cs_handles_se; + } + } + cd->fore_color = draw_colors->fore; + cd->back_color = draw_colors->back; +- if (do_change_gcs) ++ ++ cd->fore_color_north = draw_colors_north->fore; ++ cd->back_color_north = draw_colors_north->back; ++ ++ cd->fore_color_south = draw_colors_south->fore; ++ cd->back_color_south = draw_colors_south->back; ++ ++ cd->fore_color_east = draw_colors_east->fore; ++ cd->back_color_east = draw_colors_east->back; ++ ++ cd->fore_color_west = draw_colors_west->fore; ++ cd->back_color_west = draw_colors_west->back; ++ ++ cd->fore_color_nw = draw_colors_nw->fore; ++ cd->back_color_nw = draw_colors_nw->back; ++ ++ cd->fore_color_ne = draw_colors_ne->fore; ++ cd->back_color_ne = draw_colors_ne->back; ++ ++ cd->fore_color_sw = draw_colors_nw->fore; ++ cd->back_color_sw = draw_colors_nw->back; ++ ++ cd->fore_color_se = draw_colors_se->fore; ++ cd->back_color_se = draw_colors_se->back; ++ ++ if (do_change_gcs) + { + Globalgcv.foreground = draw_colors->hilight; + Globalgcm = GCForeground; + XChangeGC(dpy, Scr.ScratchGC1, Globalgcm, &Globalgcv); + Globalgcv.foreground = draw_colors->shadow; + XChangeGC(dpy, Scr.ScratchGC2, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_north->hilight; ++ XChangeGC(dpy, Scr.ScratchGC3, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_north->shadow; ++ XChangeGC(dpy, Scr.ScratchGC4, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_south->hilight; ++ XChangeGC(dpy, Scr.ScratchGC5, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_south->shadow; ++ XChangeGC(dpy, Scr.ScratchGC6, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_east->hilight; ++ XChangeGC(dpy, Scr.ScratchGC7, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_east->shadow; ++ XChangeGC(dpy, Scr.ScratchGC8, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_west->hilight; ++ XChangeGC(dpy, Scr.ScratchGC9, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_west->shadow; ++ XChangeGC(dpy, Scr.ScratchGC10, Globalgcm, &Globalgcv); ++ ++ /* handles. */ ++ Globalgcv.foreground = draw_colors_nw->hilight; ++ XChangeGC(dpy, Scr.ScratchGC11, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_nw->shadow; ++ XChangeGC(dpy, Scr.ScratchGC12, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_ne->hilight; ++ XChangeGC(dpy, Scr.ScratchGC13, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_ne->shadow; ++ XChangeGC(dpy, Scr.ScratchGC14, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_sw->hilight; ++ XChangeGC(dpy, Scr.ScratchGC15, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_sw->shadow; ++ XChangeGC(dpy, Scr.ScratchGC16, Globalgcm, &Globalgcv); ++ ++ Globalgcv.foreground = draw_colors_se->hilight; ++ XChangeGC(dpy, Scr.ScratchGC17, Globalgcm, &Globalgcv); ++ Globalgcv.foreground = draw_colors_se->shadow; ++ XChangeGC(dpy, Scr.ScratchGC18, Globalgcm, &Globalgcv); ++ + cd->relief_gc = Scr.ScratchGC1; + cd->shadow_gc = Scr.ScratchGC2; ++ ++ cd->relief_gc_north = Scr.ScratchGC3; ++ cd->shadow_gc_north = Scr.ScratchGC4; ++ ++ cd->relief_gc_south = Scr.ScratchGC5; ++ cd->shadow_gc_south = Scr.ScratchGC6; ++ ++ cd->relief_gc_east = Scr.ScratchGC7; ++ cd->shadow_gc_east = Scr.ScratchGC8; ++ ++ cd->relief_gc_west = Scr.ScratchGC9; ++ cd->shadow_gc_west = Scr.ScratchGC10; ++ ++ /* Handles */ ++ cd->relief_gc_nw = Scr.ScratchGC11; ++ cd->shadow_gc_nw = Scr.ScratchGC12; ++ ++ cd->relief_gc_ne = Scr.ScratchGC13; ++ cd->shadow_gc_ne = Scr.ScratchGC14; ++ ++ cd->relief_gc_sw = Scr.ScratchGC15; ++ cd->shadow_gc_sw = Scr.ScratchGC16; ++ ++ cd->relief_gc_se = Scr.ScratchGC17; ++ cd->shadow_gc_se = Scr.ScratchGC18; + } + + /* MWMBorder style means thin 3d effects */ +@@ -430,6 +699,17 @@ + else + { + cd->attributes.background_pixel = cd->back_color; ++ cd->attributes_north.background_pixel = cd->back_color_north; ++ cd->attributes_south.background_pixel = cd->back_color_south; ++ cd->attributes_east.background_pixel = cd->back_color_east; ++ cd->attributes_west.background_pixel = cd->back_color_west; ++ ++ /* handles */ ++ cd->attributes_nw.background_pixel = cd->back_color_nw; ++ cd->attributes_ne.background_pixel = cd->back_color_ne; ++ cd->attributes_sw.background_pixel = cd->back_color_sw; ++ cd->attributes_se.background_pixel = cd->back_color_se; ++ + cd->valuemask = CWBackPixel; + } + } +@@ -799,7 +1079,7 @@ + + static void border_get_border_gcs( + draw_border_gcs *ret_gcs, common_decorations_type *cd, FvwmWindow *fw, +- Bool do_hilight) ++ Bool do_hilight, window_parts part) + { + static GC transparent_gc = None; + DecorFaceStyle *borderstyle; +@@ -823,17 +1103,102 @@ + { + is_reversed = True; + } +- if (is_reversed) +- { +- ret_gcs->shadow = cd->relief_gc; +- ret_gcs->relief = cd->shadow_gc; +- } +- else +- { +- ret_gcs->relief = cd->relief_gc; +- ret_gcs->shadow = cd->shadow_gc; +- } +- ++ ++ switch ( part ) ++ { ++ case PART_BORDER_N: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_north; ++ ret_gcs->relief = cd->shadow_gc_north; ++ } else { ++ ret_gcs->relief = cd->relief_gc_north; ++ ret_gcs->shadow = cd->shadow_gc_north; ++ } ++ break; ++ case PART_BORDER_S: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_south; ++ ret_gcs->relief = cd->shadow_gc_south; ++ } else { ++ ret_gcs->relief = cd->relief_gc_south; ++ ret_gcs->shadow = cd->shadow_gc_south; ++ } ++ break; ++ case PART_BORDER_E: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_east; ++ ret_gcs->relief = cd->shadow_gc_east; ++ } else { ++ ret_gcs->relief = cd->relief_gc_east; ++ ret_gcs->shadow = cd->shadow_gc_east; ++ } ++ break; ++ case PART_BORDER_W: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_west; ++ ret_gcs->relief = cd->shadow_gc_west; ++ } else { ++ ret_gcs->relief = cd->relief_gc_west; ++ ret_gcs->shadow = cd->shadow_gc_west; ++ } ++ break; ++ case PART_BORDER_NW: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_nw; ++ ret_gcs->relief = cd->shadow_gc_nw; ++ } else { ++ ret_gcs->relief = cd->relief_gc_nw; ++ ret_gcs->shadow = cd->shadow_gc_nw; ++ } ++ break; ++ case PART_BORDER_NE: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_ne; ++ ret_gcs->relief = cd->shadow_gc_ne; ++ } else { ++ ret_gcs->relief = cd->relief_gc_ne; ++ ret_gcs->shadow = cd->shadow_gc_ne; ++ } ++ break; ++ case PART_BORDER_SW: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_sw; ++ ret_gcs->relief = cd->shadow_gc_sw; ++ } else { ++ ret_gcs->relief = cd->relief_gc_sw; ++ ret_gcs->shadow = cd->shadow_gc_sw; ++ } ++ break; ++ case PART_BORDER_SE: ++ if( is_reversed ) ++ { ++ ret_gcs->shadow = cd->relief_gc_se; ++ ret_gcs->relief = cd->shadow_gc_se; ++ } else { ++ ret_gcs->relief = cd->relief_gc_se; ++ ret_gcs->shadow = cd->shadow_gc_se; ++ } ++ break; ++ default: ++ if (is_reversed) ++ { ++ ret_gcs->shadow = cd->relief_gc; ++ ret_gcs->relief = cd->shadow_gc; ++ } ++ else ++ { ++ ret_gcs->relief = cd->relief_gc; ++ ret_gcs->shadow = cd->shadow_gc; ++ } ++ break; ++ } + return; + } + +@@ -1135,12 +1500,13 @@ + } + if (do_draw_shadow) + { +- x1 = x + k; ++ //x1 = x + k; ++ x1 = x; + y1 = y - 1 - k; + } + else + { +- x1 = x; ++ x1 = x - k; + y1 = y + k; + } + x2 = x1 + length; +@@ -1291,9 +1657,11 @@ + valuemask |= GCForeground | GCClipMask | GCClipXOrigin | + GCClipYOrigin; + XChangeGC(dpy, Scr.BordersGC, valuemask, &xgcv); +- XFillRectangle( ++ ++ XFillRectangle( + dpy, dest_pix, Scr.BordersGC, dest_g->x, dest_g->y, + dest_g->width - dest_g->x, dest_g->height - dest_g->y); ++ + return; + } + +@@ -1453,7 +1821,7 @@ + + static void border_get_border_background( + pixmap_background_type *bg, common_decorations_type *cd, +- rectangle *part_g, rectangle *relative_g, int *free_bg_pixmap, Window w) ++ rectangle *part_g, rectangle *relative_g, int *free_bg_pixmap, Window w, window_parts part) + { + *free_bg_pixmap = False; + +@@ -1519,9 +1887,38 @@ + else + { + bg->flags.use_pixmap = 0; +- bg->pixel = cd->attributes.background_pixel; +- } + ++ switch ( part ) ++ { ++ case PART_BORDER_N: ++ bg->pixel = cd->attributes_north.background_pixel; ++ break; ++ case PART_BORDER_S: ++ bg->pixel = cd->attributes_south.background_pixel; ++ break; ++ case PART_BORDER_E: ++ bg->pixel = cd->attributes_east.background_pixel; ++ break; ++ case PART_BORDER_W: ++ bg->pixel = cd->attributes_west.background_pixel; ++ break; ++ case PART_BORDER_NW: ++ bg->pixel = cd->attributes_nw.background_pixel; ++ break; ++ case PART_BORDER_NE: ++ bg->pixel = cd->attributes_ne.background_pixel; ++ break; ++ case PART_BORDER_SW: ++ bg->pixel = cd->attributes_sw.background_pixel; ++ break; ++ case PART_BORDER_SE: ++ bg->pixel = cd->attributes_se.background_pixel; ++ break; ++ default: ++ bg->pixel = cd->attributes.background_pixel; ++ break; ++ } ++ } + return; + } + +@@ -1551,7 +1948,7 @@ + relative_g.x = part_g.x; + relative_g.y = part_g.y; + border_get_border_background( +- &bg, cd, &part_g, &relative_g, &free_bg_pixmap, w); ++ &bg, cd, &part_g, &relative_g, &free_bg_pixmap, w, part); + if (cd->texture_pixmap) + { + switch (part) +@@ -1638,7 +2035,7 @@ + border_get_border_relief_size_descr(&br->relief, fw, do_hilight); + border_get_border_marks_descr(cd, br, fw); + /* fetch the gcs used to draw the border */ +- border_get_border_gcs(&br->gcs, cd, fw, do_hilight); ++ //border_get_border_gcs(&br->gcs, cd, fw, do_hilight); + /* draw everything in a big loop */ + draw_parts &= (PART_FRAME | PART_HANDLES); + draw_handles = (draw_parts & PART_HANDLES); +@@ -1647,11 +2044,12 @@ + { + if (part & draw_parts) + { +- border_draw_one_border_part( +- cd, fw, &br->sidebar_g, frame_g, br, part, +- draw_handles, +- (pressed_parts & part) ? True : False, +- do_clear); ++ border_get_border_gcs(&br->gcs, cd, fw, do_hilight, part); ++ border_draw_one_border_part( ++ cd, fw, &br->sidebar_g, frame_g, br, part, ++ draw_handles, ++ (pressed_parts & part) ? True : False, ++ do_clear); + } + } + +@@ -3279,7 +3677,7 @@ + relative_g.x = button_g->x; + relative_g.y = button_g->y; + border_get_border_background( +- &bg, td->cd, button_g, &relative_g, &free_bg_pixmap, w); ++ &bg, td->cd, button_g, &relative_g, &free_bg_pixmap, w, PART_NONE); + bg.pixmap.g.x = 0; + bg.pixmap.g.y = 0; + /* set the geometry for drawing the Tiled pixmap; +@@ -3723,7 +4121,7 @@ + relative_g.y = td->layout.title_g.y; + border_get_border_background( + &bg, td->cd, &td->layout.title_g, &relative_g, +- &free_bg_pixmap, w); ++ &free_bg_pixmap, w, PART_NONE); + bg.pixmap.g.x = 0; + bg.pixmap.g.y = 0; + /* set the geometry for drawing the Tiled pixmap; +diff -U3 -r fvwm/fvwm.c fvwm/fvwm.c +--- fvwm/fvwm.c 2011-08-07 00:03:31.000000000 +0200 ++++ fvwm/fvwm.c 2011-12-09 18:29:08.005127939 +0100 +@@ -1083,7 +1083,22 @@ + Scr.ScratchGC2 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); + Scr.ScratchGC3 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); + Scr.ScratchGC4 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); +- Scr.TitleGC = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC5 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC6 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC7 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC8 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC9 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC10 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC11 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC12 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC13 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC14 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC15 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC16 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC17 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ Scr.ScratchGC18 = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); ++ ++ Scr.TitleGC = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); + Scr.BordersGC = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); + Scr.TransMaskGC = fvwmlib_XCreateGC(dpy, Scr.NoFocusWin, gcm, &gcv); + Scr.ScratchMonoPixmap = XCreatePixmap(dpy, Scr.Root, 1, 1, 1); +diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-09-11 00:19:51.000000000 +0200 ++++ fvwm/fvwm.h 2011-12-09 18:29:08.008461188 +0100 +@@ -577,7 +577,23 @@ + unsigned use_colorset : 1; + unsigned use_colorset_hi : 1; + unsigned use_border_colorset : 1; ++ unsigned use_border_colorset_north : 1; ++ unsigned use_border_colorset_south : 1; ++ unsigned use_border_colorset_east : 1; ++ unsigned use_border_colorset_west : 1; ++ unsigned use_border_colorset_handles_nw : 1; ++ unsigned use_border_colorset_handles_ne : 1; ++ unsigned use_border_colorset_handles_sw : 1; ++ unsigned use_border_colorset_handles_se : 1; + unsigned use_border_colorset_hi : 1; ++ unsigned use_border_colorset_hi_north : 1; ++ unsigned use_border_colorset_hi_south : 1; ++ unsigned use_border_colorset_hi_east : 1; ++ unsigned use_border_colorset_hi_west : 1; ++ unsigned use_border_colorset_hi_handles_nw : 1; ++ unsigned use_border_colorset_hi_handles_ne : 1; ++ unsigned use_border_colorset_hi_handles_sw : 1; ++ unsigned use_border_colorset_hi_handles_se : 1; + unsigned use_icon_title_colorset : 1; + unsigned use_icon_title_colorset_hi : 1; + unsigned use_icon_background_colorset : 1; +@@ -668,7 +684,23 @@ + int colorset; + int colorset_hi; + int border_colorset; ++ int border_colorset_north; ++ int border_colorset_south; ++ int border_colorset_east; ++ int border_colorset_west; ++ int border_colorset_handles_nw; ++ int border_colorset_handles_ne; ++ int border_colorset_handles_sw; ++ int border_colorset_handles_se; + int border_colorset_hi; ++ int border_colorset_hi_north; ++ int border_colorset_hi_south; ++ int border_colorset_hi_east; ++ int border_colorset_hi_west; ++ int border_colorset_hi_handles_nw; ++ int border_colorset_hi_handles_ne; ++ int border_colorset_hi_handles_sw; ++ int border_colorset_hi_handles_se; + int icon_title_colorset; + int icon_title_colorset_hi; + int icon_background_colorset; +@@ -883,12 +915,51 @@ + color_quad colors; + color_quad hicolors; + color_quad border_colors; ++ color_quad border_colors_north; ++ color_quad border_colors_south; ++ color_quad border_colors_east; ++ color_quad border_colors_west; ++ ++ color_quad border_colors_handles_nw; ++ color_quad border_colors_handles_ne; ++ color_quad border_colors_handles_sw; ++ color_quad border_colors_handles_se; ++ + color_quad border_hicolors; ++ color_quad border_hicolors_north; ++ color_quad border_hicolors_south; ++ color_quad border_hicolors_east; ++ color_quad border_hicolors_west; ++ ++ color_quad border_hicolors_handles_nw; ++ color_quad border_hicolors_handles_ne; ++ color_quad border_hicolors_handles_sw; ++ color_quad border_hicolors_handles_se; + + int cs; + int cs_hi; + int border_cs; ++ int border_cs_north; ++ int border_cs_south; ++ int border_cs_east; ++ int border_cs_west; ++ ++ int border_cs_handles_nw; ++ int border_cs_handles_ne; ++ int border_cs_handles_sw; ++ int border_cs_handles_se; ++ + int border_cs_hi; ++ int border_cs_hi_north; ++ int border_cs_hi_south; ++ int border_cs_hi_east; ++ int border_cs_hi_west; ++ ++ int border_cs_hi_handles_nw; ++ int border_cs_hi_handles_ne; ++ int border_cs_hi_handles_sw; ++ int border_cs_hi_handles_se; ++ + int icon_title_cs; + int icon_title_cs_hi; + int icon_background_cs; +diff -U3 -r fvwm/screen.h fvwm/screen.h +--- fvwm/screen.h 2009-12-31 18:35:47.000000000 +0100 ++++ fvwm/screen.h 2011-12-09 18:29:08.008461188 +0100 +@@ -409,6 +409,21 @@ + GC ScratchGC2; + GC ScratchGC3; + GC ScratchGC4; ++ GC ScratchGC5; ++ GC ScratchGC6; ++ GC ScratchGC7; ++ GC ScratchGC8; ++ GC ScratchGC9; ++ GC ScratchGC10; ++ GC ScratchGC11; ++ GC ScratchGC12; ++ GC ScratchGC13; ++ GC ScratchGC14; ++ GC ScratchGC15; ++ GC ScratchGC16; ++ GC ScratchGC17; ++ GC ScratchGC18; ++ + GC TitleGC; + GC BordersGC; + /* minimum width of size window */ +diff -U3 -r fvwm/style.c fvwm/style.c +--- fvwm/style.c 2011-09-27 23:05:00.000000000 +0200 ++++ fvwm/style.c 2011-12-09 18:29:08.011794436 +0100 +@@ -675,11 +675,91 @@ + SSET_BORDER_COLORSET( + *merged_style, SGET_BORDER_COLORSET(*add_style)); + } ++ if (add_style->flags.use_border_colorset_north) ++ { ++ SSET_BORDER_COLORSET_NORTH( ++ *merged_style,SGET_BORDER_COLORSET_NORTH(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_south) ++ { ++ SSET_BORDER_COLORSET_SOUTH( ++ *merged_style,SGET_BORDER_COLORSET_SOUTH(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_east) ++ { ++ SSET_BORDER_COLORSET_EAST( ++ *merged_style,SGET_BORDER_COLORSET_EAST(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_west) ++ { ++ SSET_BORDER_COLORSET_WEST( ++ *merged_style,SGET_BORDER_COLORSET_WEST(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_handles_nw) ++ { ++ SSET_BORDER_COLORSET_HANDLES_NW( ++ *merged_style,SGET_BORDER_COLORSET_HANDLES_NW(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_handles_ne) ++ { ++ SSET_BORDER_COLORSET_HANDLES_NE( ++ *merged_style,SGET_BORDER_COLORSET_HANDLES_NE(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_handles_sw) ++ { ++ SSET_BORDER_COLORSET_HANDLES_SW( ++ *merged_style,SGET_BORDER_COLORSET_HANDLES_SW(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_handles_se) ++ { ++ SSET_BORDER_COLORSET_HANDLES_SE( ++ *merged_style,SGET_BORDER_COLORSET_HANDLES_SE(*add_style)); ++ } + if (add_style->flags.use_border_colorset_hi) + { + SSET_BORDER_COLORSET_HI( + *merged_style,SGET_BORDER_COLORSET_HI(*add_style)); + } ++ if (add_style->flags.use_border_colorset_hi_north) ++ { ++ SSET_BORDER_COLORSET_HI_NORTH( ++ *merged_style,SGET_BORDER_COLORSET_HI_NORTH(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_south) ++ { ++ SSET_BORDER_COLORSET_HI_SOUTH( ++ *merged_style,SGET_BORDER_COLORSET_HI_SOUTH(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_east) ++ { ++ SSET_BORDER_COLORSET_HI_EAST( ++ *merged_style,SGET_BORDER_COLORSET_HI_EAST(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_west) ++ { ++ SSET_BORDER_COLORSET_HI_WEST( ++ *merged_style,SGET_BORDER_COLORSET_HI_WEST(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_handles_nw) ++ { ++ SSET_BORDER_COLORSET_HI_HANDLES_NW( ++ *merged_style,SGET_BORDER_COLORSET_HI_HANDLES_NW(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_handles_ne) ++ { ++ SSET_BORDER_COLORSET_HI_HANDLES_NE( ++ *merged_style,SGET_BORDER_COLORSET_HI_HANDLES_NE(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_handles_sw) ++ { ++ SSET_BORDER_COLORSET_HI_HANDLES_SW( ++ *merged_style,SGET_BORDER_COLORSET_HI_HANDLES_SW(*add_style)); ++ } ++ if (add_style->flags.use_border_colorset_hi_handles_se) ++ { ++ SSET_BORDER_COLORSET_HI_HANDLES_SE( ++ *merged_style,SGET_BORDER_COLORSET_HI_HANDLES_SE(*add_style)); ++ } + if (add_style->flags.use_icon_title_colorset) + { + SSET_ICON_TITLE_COLORSET( +@@ -2223,6 +2303,120 @@ + ps->flag_mask.use_border_colorset = 1; + ps->change_mask.use_border_colorset = 1; + } ++ else if (StrEquals(token, "BorderColorsetRegions")) ++ { ++ int f[4] = {-1, -1, -1, -1}; ++ Bool bad = False; ++ ++ num = 0; ++ if (on != 0) ++ { ++ num = GetIntegerArguments(rest, &rest, val, 4); ++ ++ for (i=0; i < num; i++) ++ { ++ if (val[i] < 0) ++ { ++ bad = True; ++ } else { ++ f[i] = val[i]; ++ } ++ } ++ } ++ if (bad) ++ { ++ fvwm_msg( ++ ERR, "style_parse_one_style_option", ++ "Bad argument to BorderColorsetRegions" ++ ": %s", rest); ++ break; ++ } ++ ++ /* If 'f' defines our array of colorsets then dispatch ++ * them here. ++ */ ++ ++ SSET_BORDER_COLORSET_NORTH(*ps, f[0]); ++ alloc_colorset(f[0]); ++ ps->flags.use_border_colorset_north = (f[0] >= 0); ++ ps->flag_mask.use_border_colorset_north = 1; ++ ps->change_mask.use_border_colorset_north = 1; ++ ++ ++ SSET_BORDER_COLORSET_SOUTH(*ps, f[1]); ++ alloc_colorset(f[1]); ++ ps->flags.use_border_colorset_south = (f[1] >= 0); ++ ps->flag_mask.use_border_colorset_south = 1; ++ ps->change_mask.use_border_colorset_south = 1; ++ ++ SSET_BORDER_COLORSET_EAST(*ps, f[2]); ++ alloc_colorset(f[2]); ++ ps->flags.use_border_colorset_east = (f[2] >= 0); ++ ps->flag_mask.use_border_colorset_east = 1; ++ ps->change_mask.use_border_colorset_east = 1; ++ ++ SSET_BORDER_COLORSET_WEST(*ps, f[3]); ++ alloc_colorset(f[3]); ++ ps->flags.use_border_colorset_west = (f[3] >= 0); ++ ps->flag_mask.use_border_colorset_west = 1; ++ ps->change_mask.use_border_colorset_west = 1; ++ } ++ else if (StrEquals(token, "BorderHandlesColorsetRegions")) ++ { ++ int f[4] = {-1, -1, -1, -1}; ++ Bool bad = False; ++ ++ num = 0; ++ if (on != 0) ++ { ++ num = GetIntegerArguments(rest, &rest, val, 4); ++ ++ for (i=0; i < num; i++) ++ { ++ if (val[i] < 0) ++ bad = True; ++ f[i] = val[i]; ++ } ++ } ++ if (bad) ++ { ++ fvwm_msg( ++ ERR, "style_parse_one_style_option", ++ "Bad argument to HandlesColorsetRegions" ++ ": %s", rest); ++ break; ++ } ++ ++ /* If 'f' defines our array of colorsets then dispatch ++ * them here. ++ */ ++ ++ SSET_BORDER_COLORSET_HANDLES_NW(*ps, f[0]); ++ alloc_colorset(f[0]); ++ ps->flags.use_border_colorset_handles_nw = (f[0] >= 0); ++ ps->flag_mask.use_border_colorset_handles_nw = 1; ++ ps->change_mask.use_border_colorset_handles_nw = 1; ++ ++ SSET_BORDER_COLORSET_HANDLES_NE(*ps, f[1]); ++ alloc_colorset(f[1]); ++ ps->flags.use_border_colorset_handles_ne = (f[1] >= 0); ++ ps->flag_mask.use_border_colorset_handles_ne = 1; ++ ps->change_mask.use_border_colorset_handles_ne = 1; ++ ++ SSET_BORDER_COLORSET_HANDLES_SW(*ps, f[2]); ++ alloc_colorset(f[2]); ++ ps->flags.use_border_colorset_handles_sw = (f[2] >= 0); ++ ps->flag_mask.use_border_colorset_handles_sw = 1; ++ ps->change_mask.use_border_colorset_handles_sw = 1; ++ ++ SSET_BORDER_COLORSET_HANDLES_SE(*ps, f[3]); ++ alloc_colorset(f[3]); ++ ps->flags.use_border_colorset_handles_se = (f[3] >= 0); ++ ps->flag_mask.use_border_colorset_handles_se = 1; ++ ps->change_mask.use_border_colorset_handles_se = 1; ++ ++ } ++ + else if (StrEquals(token, "BottomTitleRotated")) + { + S_SET_IS_BOTTOM_TITLE_ROTATED(SCF(*ps), on); +@@ -2871,7 +3065,117 @@ + ps->flag_mask.use_border_colorset_hi = 1; + ps->change_mask.use_border_colorset_hi = 1; + } +- else if (StrEquals(token, "HilightIconTitleColorset")) ++ else if (StrEquals(token, "HilightBorderColorsetRegions")) ++ { ++ int f[4] = {-1, -1, -1, -1}; ++ Bool bad = False; ++ ++ num = 0; ++ if (on != 0) ++ { ++ num = GetIntegerArguments(rest, &rest, val, 4); ++ ++ for (i=0; i < num; i++) ++ { ++ if (val[i] < 0) ++ bad = True; ++ f[i] = val[i]; ++ } ++ } ++ if (bad) ++ { ++ fvwm_msg( ++ ERR, "style_parse_one_style_option", ++ "Bad argument to HilightBorderColorsetRegions" ++ ": %s", rest); ++ break; ++ } ++ ++ /* If 'f' defines our array of colorsets then dispatch ++ * them here. ++ */ ++ ++ SSET_BORDER_COLORSET_HI_NORTH(*ps, f[0]); ++ alloc_colorset(f[0]); ++ ps->flags.use_border_colorset_hi_north = (f[0] >= 0); ++ ps->flag_mask.use_border_colorset_hi_north = 1; ++ ps->change_mask.use_border_colorset_hi_north = 1; ++ ++ SSET_BORDER_COLORSET_HI_SOUTH(*ps, f[1]); ++ alloc_colorset(f[1]); ++ ps->flags.use_border_colorset_hi_south = (f[1] >= 0); ++ ps->flag_mask.use_border_colorset_hi_south = 1; ++ ps->change_mask.use_border_colorset_hi_south = 1; ++ ++ SSET_BORDER_COLORSET_HI_EAST(*ps, f[2]); ++ alloc_colorset(f[2]); ++ ps->flags.use_border_colorset_hi_east = (f[2] >= 0); ++ ps->flag_mask.use_border_colorset_hi_east = 1; ++ ps->change_mask.use_border_colorset_hi_east = 1; ++ ++ SSET_BORDER_COLORSET_HI_WEST(*ps, f[3]); ++ alloc_colorset(f[3]); ++ ps->flags.use_border_colorset_hi_west = (f[3] >= 0); ++ ps->flag_mask.use_border_colorset_hi_west = 1; ++ ps->change_mask.use_border_colorset_hi_west = 1; ++ ++ } ++ else if (StrEquals(token, "HilightHandlesColorsetRegions")) ++ { ++ int f[4] = {-1, -1, -1, -1}; ++ Bool bad = False; ++ ++ num = 0; ++ if (on != 0) ++ { ++ num = GetIntegerArguments(rest, &rest, val, 4); ++ ++ for (i=0; i < num; i++) ++ { ++ if (val[i] < 0) ++ bad = True; ++ f[i] = val[i]; ++ } ++ } ++ if (bad) ++ { ++ fvwm_msg( ++ ERR, "style_parse_one_style_option", ++ "Bad argument to HilightHandlesColorsetRegions" ++ ": %s", rest); ++ break; ++ } ++ ++ /* If 'f' defines our array of colorsets then dispatch ++ * them here. ++ */ ++ ++ SSET_BORDER_COLORSET_HI_HANDLES_NW(*ps, f[0]); ++ alloc_colorset(f[0]); ++ ps->flags.use_border_colorset_hi_handles_nw = (f[0] >= 0); ++ ps->flag_mask.use_border_colorset_hi_handles_nw = 1; ++ ps->change_mask.use_border_colorset_hi_handles_nw = 1; ++ ++ SSET_BORDER_COLORSET_HI_HANDLES_NE(*ps, f[1]); ++ alloc_colorset(f[1]); ++ ps->flags.use_border_colorset_hi_handles_ne = (f[1] >= 0); ++ ps->flag_mask.use_border_colorset_hi_handles_ne = 1; ++ ps->change_mask.use_border_colorset_hi_handles_ne = 1; ++ ++ SSET_BORDER_COLORSET_HI_HANDLES_SW(*ps, f[2]); ++ alloc_colorset(f[2]); ++ ps->flags.use_border_colorset_hi_handles_sw = (f[2] >= 0); ++ ps->flag_mask.use_border_colorset_hi_handles_sw = 1; ++ ps->change_mask.use_border_colorset_hi_handles_sw = 1; ++ ++ SSET_BORDER_COLORSET_HI_HANDLES_SE(*ps, f[3]); ++ alloc_colorset(f[3]); ++ ps->flags.use_border_colorset_hi_handles_se = (f[3] >= 0); ++ ps->flag_mask.use_border_colorset_hi_handles_se = 1; ++ ps->change_mask.use_border_colorset_hi_handles_se = 1; ++ ++ } ++ else if (StrEquals(token, "HilightIconTitleColorset")) + { + *val = -1; + GetIntegerArguments(rest, &rest, val, 1); +@@ -5290,6 +5594,62 @@ + temp->change_mask.use_border_colorset = 1; + Scr.flags.do_need_window_update = 1; + } ++ if (SUSE_BORDER_COLORSET_NORTH(&temp->flags) && ++ SGET_BORDER_COLORSET_NORTH(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_north = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_SOUTH(&temp->flags) && ++ SGET_BORDER_COLORSET_SOUTH(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_south = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_EAST(&temp->flags) && ++ SGET_BORDER_COLORSET_EAST(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_east = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_WEST(&temp->flags) && ++ SGET_BORDER_COLORSET_WEST(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_west = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_NW(&temp->flags) && ++ SGET_BORDER_COLORSET_HANDLES_NW(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_handles_nw = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_NE(&temp->flags) && ++ SGET_BORDER_COLORSET_HANDLES_NE(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_handles_ne = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_SW(&temp->flags) && ++ SGET_BORDER_COLORSET_HANDLES_SW(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_handles_sw = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_SE(&temp->flags) && ++ SGET_BORDER_COLORSET_HANDLES_SE(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_handles_se = 1; ++ Scr.flags.do_need_window_update = 1; ++ } + if (SUSE_BORDER_COLORSET_HI(&temp->flags) && + SGET_BORDER_COLORSET_HI(*temp) == colorset) + { +@@ -5297,6 +5657,62 @@ + temp->change_mask.use_border_colorset_hi = 1; + Scr.flags.do_need_window_update = 1; + } ++ if (SUSE_BORDER_COLORSET_HI_NORTH(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_NORTH(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_north = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_SOUTH(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_SOUTH(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_south = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_EAST(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_EAST(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_east = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_WEST(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_WEST(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_west = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_NW(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_HANDLES_NW(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_handles_nw = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_NE(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_HANDLES_NE(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_handles_ne = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_SW(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_HANDLES_SW(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_handles_sw = 1; ++ Scr.flags.do_need_window_update = 1; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_SE(&temp->flags) && ++ SGET_BORDER_COLORSET_HI_HANDLES_SE(*temp) == colorset) ++ { ++ temp->has_style_changed = 1; ++ temp->change_mask.use_border_colorset_hi_handles_se = 1; ++ Scr.flags.do_need_window_update = 1; ++ } + if (SUSE_ICON_TITLE_COLORSET(&temp->flags) && + SGET_ICON_TITLE_COLORSET(*temp) == colorset) + { +@@ -5374,7 +5790,129 @@ + fw->border_colors.shadow = fw->colors.shadow; + fw->border_colors.back = fw->colors.back; + } +-} ++ if (SUSE_BORDER_COLORSET_NORTH(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_NORTH(*pstyle); ++ fw->border_cs_north = cs; ++ fw->border_colors_north.hilight = Colorset[cs].hilite; ++ fw->border_colors_north.shadow = Colorset[cs].shadow; ++ fw->border_colors_north.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_north = -1; ++ fw->border_colors_north.hilight = fw->colors.hilight; ++ fw->border_colors_north.shadow = fw->colors.shadow; ++ fw->border_colors_north.back = fw->colors.back; ++ } ++ if (SUSE_BORDER_COLORSET_SOUTH(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_SOUTH(*pstyle); ++ fw->border_cs_south = cs; ++ fw->border_colors_south.hilight = Colorset[cs].hilite; ++ fw->border_colors_south.shadow = Colorset[cs].shadow; ++ fw->border_colors_south.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_south = -1; ++ fw->border_colors_south.hilight = fw->colors.hilight; ++ fw->border_colors_south.shadow = fw->colors.shadow; ++ fw->border_colors_south.back = fw->colors.back; ++ } ++ if (SUSE_BORDER_COLORSET_EAST(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_EAST(*pstyle); ++ fw->border_cs_east = cs; ++ fw->border_colors_east.hilight = Colorset[cs].hilite; ++ fw->border_colors_east.shadow = Colorset[cs].shadow; ++ fw->border_colors_east.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_east = -1; ++ fw->border_colors_east.hilight = fw->colors.hilight; ++ fw->border_colors_east.shadow = fw->colors.shadow; ++ fw->border_colors_east.back = fw->colors.back; ++ } ++ if (SUSE_BORDER_COLORSET_WEST(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_WEST(*pstyle); ++ fw->border_cs_west = cs; ++ fw->border_colors_west.hilight = Colorset[cs].hilite; ++ fw->border_colors_west.shadow = Colorset[cs].shadow; ++ fw->border_colors_west.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_west = -1; ++ fw->border_colors_west.hilight = fw->colors.hilight; ++ fw->border_colors_west.shadow = fw->colors.shadow; ++ fw->border_colors_west.back = fw->colors.back; ++ } ++ /* handles */ ++ if (SUSE_BORDER_COLORSET_HANDLES_NW(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HANDLES_NW(*pstyle); ++ fw->border_cs_handles_nw = cs; ++ fw->border_colors_handles_nw.hilight = Colorset[cs].hilite; ++ fw->border_colors_handles_nw.shadow = Colorset[cs].shadow; ++ fw->border_colors_handles_nw.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_handles_nw = -1; ++ fw->border_colors_handles_nw.hilight = fw->colors.hilight; ++ fw->border_colors_handles_nw.shadow = fw->colors.shadow; ++ fw->border_colors_handles_nw.back = fw->colors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_NE(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HANDLES_NE(*pstyle); ++ fw->border_cs_handles_ne = cs; ++ fw->border_colors_handles_ne.hilight = Colorset[cs].hilite; ++ fw->border_colors_handles_ne.shadow = Colorset[cs].shadow; ++ fw->border_colors_handles_ne.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_handles_ne = -1; ++ fw->border_colors_handles_ne.hilight = fw->colors.hilight; ++ fw->border_colors_handles_ne.shadow = fw->colors.shadow; ++ fw->border_colors_handles_ne.back = fw->colors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_SW(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HANDLES_SW(*pstyle); ++ fw->border_cs_handles_sw = cs; ++ fw->border_colors_handles_sw.hilight = Colorset[cs].hilite; ++ fw->border_colors_handles_sw.shadow = Colorset[cs].shadow; ++ fw->border_colors_handles_sw.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_handles_sw = -1; ++ fw->border_colors_handles_sw.hilight = fw->colors.hilight; ++ fw->border_colors_handles_sw.shadow = fw->colors.shadow; ++ fw->border_colors_handles_sw.back = fw->colors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HANDLES_SE(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HANDLES_SE(*pstyle); ++ fw->border_cs_handles_se = cs; ++ fw->border_colors_handles_se.hilight = Colorset[cs].hilite; ++ fw->border_colors_handles_se.shadow = Colorset[cs].shadow; ++ fw->border_colors_handles_se.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_handles_se = -1; ++ fw->border_colors_handles_se.hilight = fw->colors.hilight; ++ fw->border_colors_handles_se.shadow = fw->colors.shadow; ++ fw->border_colors_handles_se.back = fw->colors.back; ++ } ++ ++} + + void update_window_color_hi_style(FvwmWindow *fw, window_style *pstyle) + { +@@ -5428,6 +5966,127 @@ + fw->border_hicolors.shadow = fw->hicolors.shadow; + fw->border_hicolors.back = fw->hicolors.back; + } ++ if (SUSE_BORDER_COLORSET_HI_NORTH(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_NORTH(*pstyle); ++ fw->border_cs_hi_north = cs; ++ fw->border_hicolors_north.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_north.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_north.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_north = -1; ++ fw->border_hicolors_north.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_north.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_north.back = fw->hicolors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HI_SOUTH(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_SOUTH(*pstyle); ++ fw->border_cs_hi_south = cs; ++ fw->border_hicolors_south.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_south.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_south.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_south = -1; ++ fw->border_hicolors_south.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_south.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_south.back = fw->hicolors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HI_EAST(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_EAST(*pstyle); ++ fw->border_cs_hi_east = cs; ++ fw->border_hicolors_east.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_east.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_east.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_east = -1; ++ fw->border_hicolors_east.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_east.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_east.back = fw->hicolors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HI_WEST(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_WEST(*pstyle); ++ fw->border_cs_hi_west = cs; ++ fw->border_hicolors_west.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_west.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_west.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_west = -1; ++ fw->border_hicolors_west.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_west.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_west.back = fw->hicolors.back; ++ } ++ /* Handles */ ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_NW(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_HANDLES_NW(*pstyle); ++ fw->border_cs_hi_handles_nw = cs; ++ fw->border_hicolors_handles_nw.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_handles_nw.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_handles_nw.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_handles_nw = -1; ++ fw->border_hicolors_handles_nw.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_handles_nw.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_handles_nw.back = fw->hicolors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_NE(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_HANDLES_NE(*pstyle); ++ fw->border_cs_hi_handles_ne = cs; ++ fw->border_hicolors_handles_ne.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_handles_ne.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_handles_ne.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_handles_ne = -1; ++ fw->border_hicolors_handles_ne.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_handles_ne.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_handles_ne.back = fw->hicolors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_SW(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_HANDLES_SW(*pstyle); ++ fw->border_cs_hi_handles_sw = cs; ++ fw->border_hicolors_handles_sw.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_handles_sw.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_handles_sw.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_handles_sw = -1; ++ fw->border_hicolors_handles_sw.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_handles_sw.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_handles_sw.back = fw->hicolors.back; ++ } ++ if (SUSE_BORDER_COLORSET_HI_HANDLES_SE(&pstyle->flags)) ++ { ++ cs = SGET_BORDER_COLORSET_HI_HANDLES_SE(*pstyle); ++ fw->border_cs_hi_handles_se = cs; ++ fw->border_hicolors_handles_se.hilight = Colorset[cs].hilite; ++ fw->border_hicolors_handles_se.shadow = Colorset[cs].shadow; ++ fw->border_hicolors_handles_se.back = Colorset[cs].bg; ++ } ++ else ++ { ++ fw->border_cs_hi_handles_se = -1; ++ fw->border_hicolors_handles_se.hilight = fw->hicolors.hilight; ++ fw->border_hicolors_handles_se.shadow = fw->hicolors.shadow; ++ fw->border_hicolors_handles_se.back = fw->hicolors.back; ++ } + } + + void update_icon_title_cs_style(FvwmWindow *fw, window_style *pstyle) +diff -U3 -r fvwm/style.h fvwm/style.h +--- fvwm/style.h 2011-08-15 18:26:17.000000000 +0200 ++++ fvwm/style.h 2011-12-09 18:29:08.015127684 +0100 +@@ -72,8 +72,40 @@ + ((sf)->use_colorset_hi) + #define SUSE_BORDER_COLORSET(sf) \ + ((sf)->use_border_colorset) ++#define SUSE_BORDER_COLORSET_NORTH(sf) \ ++ ((sf)->use_border_colorset_north) ++#define SUSE_BORDER_COLORSET_SOUTH(sf) \ ++ ((sf)->use_border_colorset_south) ++#define SUSE_BORDER_COLORSET_EAST(sf) \ ++ ((sf)->use_border_colorset_east) ++#define SUSE_BORDER_COLORSET_WEST(sf) \ ++ ((sf)->use_border_colorset_west) ++#define SUSE_BORDER_COLORSET_HANDLES_NW(sf) \ ++ ((sf)->use_border_colorset_handles_nw) ++#define SUSE_BORDER_COLORSET_HANDLES_NE(sf) \ ++ ((sf)->use_border_colorset_handles_ne) ++#define SUSE_BORDER_COLORSET_HANDLES_SW(sf) \ ++ ((sf)->use_border_colorset_handles_sw) ++#define SUSE_BORDER_COLORSET_HANDLES_SE(sf) \ ++ ((sf)->use_border_colorset_handles_se) + #define SUSE_BORDER_COLORSET_HI(sf) \ + ((sf)->use_border_colorset_hi) ++#define SUSE_BORDER_COLORSET_HI_NORTH(sf) \ ++ ((sf)->use_border_colorset_hi_north) ++#define SUSE_BORDER_COLORSET_HI_SOUTH(sf) \ ++ ((sf)->use_border_colorset_hi_south) ++#define SUSE_BORDER_COLORSET_HI_EAST(sf) \ ++ ((sf)->use_border_colorset_hi_east) ++#define SUSE_BORDER_COLORSET_HI_WEST(sf) \ ++ ((sf)->use_border_colorset_hi_west) ++#define SUSE_BORDER_COLORSET_HI_HANDLES_NW(sf) \ ++ ((sf)->use_border_colorset_hi_handles_nw) ++#define SUSE_BORDER_COLORSET_HI_HANDLES_NE(sf) \ ++ ((sf)->use_border_colorset_hi_handles_ne) ++#define SUSE_BORDER_COLORSET_HI_HANDLES_SW(sf) \ ++ ((sf)->use_border_colorset_hi_handles_sw) ++#define SUSE_BORDER_COLORSET_HI_HANDLES_SE(sf) \ ++ ((sf)->use_border_colorset_hi_handles_se) + #define SUSE_ICON_TITLE_COLORSET(sf) \ + ((sf)->use_icon_title_colorset) + #define SUSE_ICON_TITLE_COLORSET_HI(sf) \ +@@ -464,6 +496,38 @@ + ((s).border_colorset = (x)) + #define SGET_BORDER_COLORSET(s) \ + ((s).border_colorset) ++#define SSET_BORDER_COLORSET_NORTH(s,x) \ ++ ((s).border_colorset_north = (x)) ++#define SGET_BORDER_COLORSET_NORTH(s) \ ++ ((s).border_colorset_north) ++#define SSET_BORDER_COLORSET_SOUTH(s,x) \ ++ ((s).border_colorset_south = (x)) ++#define SGET_BORDER_COLORSET_SOUTH(s) \ ++ ((s).border_colorset_south) ++#define SSET_BORDER_COLORSET_EAST(s,x) \ ++ ((s).border_colorset_east = (x)) ++#define SGET_BORDER_COLORSET_EAST(s) \ ++ ((s).border_colorset_east) ++#define SSET_BORDER_COLORSET_WEST(s,x) \ ++ ((s).border_colorset_west = (x)) ++#define SGET_BORDER_COLORSET_WEST(s) \ ++ ((s).border_colorset_west) ++#define SSET_BORDER_COLORSET_HANDLES_NW(s,x) \ ++ ((s).border_colorset_handles_nw = (x)) ++#define SGET_BORDER_COLORSET_HANDLES_NW(s) \ ++ ((s).border_colorset_handles_nw) ++#define SSET_BORDER_COLORSET_HANDLES_NE(s,x) \ ++ ((s).border_colorset_handles_ne = (x)) ++#define SGET_BORDER_COLORSET_HANDLES_NE(s) \ ++ ((s).border_colorset_handles_ne) ++#define SSET_BORDER_COLORSET_HANDLES_SW(s,x) \ ++ ((s).border_colorset_handles_sw = (x)) ++#define SGET_BORDER_COLORSET_HANDLES_SW(s) \ ++ ((s).border_colorset_handles_sw) ++#define SSET_BORDER_COLORSET_HANDLES_SE(s,x) \ ++ ((s).border_colorset_handles_se = (x)) ++#define SGET_BORDER_COLORSET_HANDLES_SE(s) \ ++ ((s).border_colorset_handles_se) + #define SGET_COLORSET_HI(s) \ + ((s).colorset_hi) + #define SSET_COLORSET_HI(s,x) \ +@@ -472,8 +536,40 @@ + ((s).border_colorset_hi) + #define SSET_BORDER_COLORSET_HI(s,x) \ + ((s).border_colorset_hi = (x)) ++#define SGET_BORDER_COLORSET_HI_NORTH(s) \ ++ ((s).border_colorset_hi_north) ++#define SSET_BORDER_COLORSET_HI_NORTH(s,x) \ ++ ((s).border_colorset_hi_north = (x)) ++#define SGET_BORDER_COLORSET_HI_SOUTH(s) \ ++ ((s).border_colorset_hi_south) ++#define SSET_BORDER_COLORSET_HI_SOUTH(s,x) \ ++ ((s).border_colorset_hi_south = (x)) ++#define SGET_BORDER_COLORSET_HI_EAST(s) \ ++ ((s).border_colorset_hi_east) ++#define SSET_BORDER_COLORSET_HI_EAST(s,x) \ ++ ((s).border_colorset_hi_east = (x)) ++#define SGET_BORDER_COLORSET_HI_WEST(s) \ ++ ((s).border_colorset_hi_west) ++#define SSET_BORDER_COLORSET_HI_WEST(s,x) \ ++ ((s).border_colorset_hi_west = (x)) ++#define SSET_BORDER_COLORSET_HI_HANDLES_NW(s,x) \ ++ ((s).border_colorset_hi_handles_nw = (x)) ++#define SGET_BORDER_COLORSET_HI_HANDLES_NW(s) \ ++ ((s).border_colorset_hi_handles_nw) ++#define SSET_BORDER_COLORSET_HI_HANDLES_NE(s,x) \ ++ ((s).border_colorset_hi_handles_ne = (x)) ++#define SGET_BORDER_COLORSET_HI_HANDLES_NE(s) \ ++ ((s).border_colorset_hi_handles_ne) ++#define SSET_BORDER_COLORSET_HI_HANDLES_SW(s,x) \ ++ ((s).border_colorset_hi_handles_sw = (x)) ++#define SGET_BORDER_COLORSET_HI_HANDLES_SW(s) \ ++ ((s).border_colorset_hi_handles_sw) ++#define SSET_BORDER_COLORSET_HI_HANDLES_SE(s,x) \ ++ ((s).border_colorset_hi_handles_se = (x)) ++#define SGET_BORDER_COLORSET_HI_HANDLES_SE(s) \ ++ ((s).border_colorset_hi_handles_se) + #define SSET_ICON_TITLE_COLORSET(s,x) \ +- ((s).icon_title_colorset = (x)) ++ ((s).icon_title_colorset = (x)) + #define SGET_ICON_TITLE_COLORSET(s) \ + ((s).icon_title_colorset) + #define SSET_ICON_TITLE_COLORSET_HI(s,x) \ +Seulement dans libs: PictureGraphics.c.orig diff --git a/03-ResizeOutlineThin.patch b/03-ResizeOutlineThin.patch new file mode 100644 index 000000000000..54cdc4a2d2b2 --- /dev/null +++ b/03-ResizeOutlineThin.patch @@ -0,0 +1,638 @@ +diff -U10 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-12-09 18:29:08.008461188 +0100 ++++ fvwm/fvwm.h 2011-12-09 18:38:57.683444407 +0100 +@@ -218,20 +218,21 @@ + unsigned do_ewmh_ignore_window_type : 1; + unsigned do_iconify_window_groups : 1; + unsigned do_ignore_gnome_hints : 1; + unsigned do_ignore_icon_boxes : 1; + unsigned do_ignore_restack : 1; + unsigned do_use_window_group_hint : 1; + unsigned do_lower_transient : 1; + unsigned do_not_show_on_map : 1; + unsigned do_raise_transient : 1; + unsigned do_resize_opaque : 1; ++ unsigned do_resize_outline_thin : 1; + unsigned do_shrink_windowshade : 1; + unsigned do_stack_transient_parent : 1; + unsigned do_window_list_skip : 1; + unsigned ewmh_maximize_mode : 2; /* see ewmh.h */ + unsigned has_depressable_border : 1; + unsigned has_mwm_border : 1; + unsigned has_mwm_buttons : 1; + unsigned has_mwm_override : 1; + unsigned has_no_icon_title : 1; + unsigned has_override_size : 1; +diff -U10 -r fvwm/move_resize.c fvwm/move_resize.c +--- fvwm/move_resize.c 2011-08-28 02:28:04.000000000 +0200 ++++ fvwm/move_resize.c 2011-12-09 18:44:06.335552790 +0100 +@@ -101,179 +101,195 @@ + /* ----- end of move globals ----- */ + + /* ----- resize globals ----- */ + + /* DO NOT USE (STATIC) GLOBALS IN THIS MODULE! + * Since some functions are called from other modules unwanted side effects + * (i.e. bugs.) would be created */ + + extern Window PressedW; + +-static void draw_move_resize_grid(int x, int y, int width, int height); ++static void draw_move_resize_grid(int x, int y, int width, int height, Bool thin); + + /* ----- end of resize globals ----- */ + + /* + * + * Procedure: + * draw_move_resize_grid - move a window outline + * + * Inputs: + * root - the window we are outlining + * x - upper left x coordinate + * y - upper left y coordinate + * width - the width of the rectangle + * height - the height of the rectangle + * + */ + static int get_outline_rects( +- XRectangle *rects, int x, int y, int width, int height) ++ XRectangle *rects, int x, int y, int width, int height, Bool do_outline_thin) + { + int i; + int n; + int m; + +- n = 3; +- m = (width - 5) / 2; +- if (m < n) ++ if (do_outline_thin) + { +- n = m; +- } +- m = (height - 5) / 2; +- if (m < n) +- { +- n = m; ++ n = 1; + } +- if (n < 1) ++ else + { +- n = 1; ++ n = 3; ++ m = (width - 5) / 2; ++ if (m < n) ++ { ++ n = m; ++ } ++ m = (height - 5) / 2; ++ if (m < n) ++ { ++ n = m; ++ } ++ if (n < 1) ++ { ++ n = 1; ++ } + } + + for (i = 0; i < n; i++) + { + rects[i].x = x + i; + rects[i].y = y + i; + rects[i].width = width - (i << 1); + rects[i].height = height - (i << 1); + } +- if (width - (n << 1) >= 5 && height - (n << 1) >= 5) ++ if (!do_outline_thin) + { +- if (width - (n << 1) >= 10) ++ if (width - (n << 1) >= 5 && height - (n << 1) >= 5) + { +- int off = (width - (n << 1)) / 3 + n; +- rects[i].x = x + off; +- rects[i].y = y + n; +- rects[i].width = width - (off << 1); +- rects[i].height = height - (n << 1); +- i++; +- } +- if (height - (n << 1) >= 10) +- { +- int off = (height - (n << 1)) / 3 + n; +- rects[i].x = x + n; +- rects[i].y = y + off; +- rects[i].width = width - (n << 1); +- rects[i].height = height - (off << 1); +- i++; ++ if (width - (n << 1) >= 10) ++ { ++ int off = (width - (n << 1)) / 3 + n; ++ rects[i].x = x + off; ++ rects[i].y = y + n; ++ rects[i].width = width - (off << 1); ++ rects[i].height = height - (n << 1); ++ i++; ++ } ++ if (height - (n << 1) >= 10) ++ { ++ int off = (height - (n << 1)) / 3 + n; ++ rects[i].x = x + n; ++ rects[i].y = y + off; ++ rects[i].width = width - (n << 1); ++ rects[i].height = height - (off << 1); ++ i++; ++ } + } + } + + return i; + } + + struct + { + rectangle geom; + struct + { + unsigned is_enabled : 1; ++ unsigned do_outline_thin : 1; + } flags; + } move_resize_grid = + { + { 0, 0, 0, 0 }, +- { 0 } ++ { 0, 0 } + }; + +-static void draw_move_resize_grid(int x, int y, int width, int height) ++static void draw_move_resize_grid(int x, int y, int width, int height, Bool do_outline_thin) + { + int nrects = 0; + XRectangle rects[10]; + + if (move_resize_grid.flags.is_enabled && + x == move_resize_grid.geom.x && + y == move_resize_grid.geom.y && + width == move_resize_grid.geom.width && +- height == move_resize_grid.geom.height) ++ height == move_resize_grid.geom.height && ++ do_outline_thin == move_resize_grid.flags.do_outline_thin) + { + return; + } + + memset(rects, 0, 10 * sizeof(XRectangle)); + /* place the resize rectangle into the array of rectangles */ + /* interleave them for best visual look */ + /* draw the new one, if any */ + if (move_resize_grid.flags.is_enabled + /*move_resize_grid.geom.width && move_resize_grid.geom.height*/) + { + move_resize_grid.flags.is_enabled = 0; + nrects += + get_outline_rects( + &(rects[0]), move_resize_grid.geom.x, + move_resize_grid.geom.y, + move_resize_grid.geom.width, +- move_resize_grid.geom.height); ++ move_resize_grid.geom.height, ++ move_resize_grid.flags.do_outline_thin); + } + if (width && height) + { + move_resize_grid.flags.is_enabled = 1; + move_resize_grid.geom.x = x; + move_resize_grid.geom.y = y; + move_resize_grid.geom.width = width; + move_resize_grid.geom.height = height; ++ move_resize_grid.flags.do_outline_thin = do_outline_thin; + nrects += get_outline_rects( +- &(rects[nrects]), x, y, width, height); ++ &(rects[nrects]), x, y, width, height, do_outline_thin); + } + if (nrects > 0) + { + XDrawRectangles(dpy, Scr.Root, Scr.XorGC, rects, nrects); + XFlush(dpy); + } + + return; + } + + void switch_move_resize_grid(Bool state) + { + if (state == False) + { + if (move_resize_grid.flags.is_enabled) + { +- draw_move_resize_grid(0, 0, 0, 0); ++ draw_move_resize_grid(0, 0, 0, 0, 0); + } + else + { + move_resize_grid.geom.x = 0; + move_resize_grid.geom.y = 0; + move_resize_grid.geom.width = 0; +- move_resize_grid.geom.height = 0; ++ move_resize_grid.geom.height = 0; ++ move_resize_grid.flags.do_outline_thin = 0; + } + } + else if (!move_resize_grid.flags.is_enabled) + { + if (move_resize_grid.geom.width && + move_resize_grid.geom.height) + { + draw_move_resize_grid( + move_resize_grid.geom.x, + move_resize_grid.geom.y, + move_resize_grid.geom.width, +- move_resize_grid.geom.height); ++ move_resize_grid.geom.height, ++ move_resize_grid.flags.do_outline_thin); + } + } + + return; + } + + static int ParsePositionArgumentSuffix( + float *ret_factor, char *suffix, float wfactor, float sfactor) + { + int n; +@@ -2362,20 +2378,21 @@ + int orig_icon_x = 0; + int orig_icon_y = 0; + Bool do_snap = True; + Bool was_snapped = False; + /* if Alt is initially pressed don't enable no-snap until Alt is + * released */ + Bool nosnap_enabled = False; + /* Must not set placed by button if the event is a modified KeyEvent */ + Bool is_fake_event; + FvwmWindow *fw = exc->w.fw; ++ Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw); + unsigned int draw_parts = PART_NONE; + XEvent e; + + if (!GrabEm(cursor, GRAB_NORMAL)) + { + XBell(dpy, 0); + return False; + } + if (!IS_MAPPED(fw) && !IS_ICONIFIED(fw)) + { +@@ -2435,21 +2452,21 @@ + yt += YOffset; + } + button_mask &= DEFAULT_ALL_BUTTONS_MASK; + xl_orig = xl; + yt_orig = yt; + + /* draw initial outline */ + if (!IS_ICONIFIED(fw) && + ((!do_move_opaque && !Scr.gs.do_emulate_mwm) || !IS_MAPPED(fw))) + { +- draw_move_resize_grid(xl, yt, Width - 1, Height - 1); ++ draw_move_resize_grid(xl, yt, Width - 1, Height - 1, do_outline_thin); + } + + if (move_w == FW_W_FRAME(fw) && do_move_opaque) + { + draw_parts = border_get_transparent_decorations_part(fw); + } + DisplayPosition(fw, exc->x.elast, xl, yt, True); + + memset(&e, 0, sizeof(e)); + +@@ -2765,21 +2782,21 @@ + } + + /* check Paging request once and only once after + * outline redrawn redraw after paging if needed + * - mab */ + for (paged = 0; paged <= 1; paged++) + { + if (!do_move_opaque) + { + draw_move_resize_grid( +- xl, yt, Width - 1, Height - 1); ++ xl, yt, Width - 1, Height - 1, do_outline_thin); + } + else + { + if (IS_ICONIFIED(fw)) + { + set_icon_position(fw, xl, yt); + move_icon_to_position(fw); + broadcast_icon_geometry( + fw, False); + } +@@ -2837,21 +2854,21 @@ + if (!do_move_opaque) + { + /* must undraw the rubber band in case the + * event causes some drawing */ + switch_move_resize_grid(False); + } + dispatch_event(&e); + if (!do_move_opaque) + { + draw_move_resize_grid( +- xl, yt, Width - 1, Height - 1); ++ xl, yt, Width - 1, Height - 1, do_outline_thin); + } + break; + + default: + /* cannot happen */ + break; + } /* switch */ + xl += x_virtual_offset; + yt += y_virtual_offset; + if (do_move_opaque && !IS_ICONIFIED(fw) && +@@ -3459,21 +3476,21 @@ + * y_off - y offset of pointer from border (input/output) + * drag - resize internal structure + * orig - resize internal structure + * xmotionp - pointer to xmotion in resize_window + * ymotionp - pointer to ymotion in resize_window + * + */ + static void __resize_step( + const exec_context_t *exc, int x_root, int y_root, int *x_off, + int *y_off, rectangle *drag, const rectangle *orig, int *xmotionp, +- int *ymotionp, Bool do_resize_opaque, Bool is_direction_fixed) ++ int *ymotionp, Bool do_resize_opaque, Bool is_direction_fixed, Bool do_outline_thin) + { + int action = 0; + int x2; + int y2; + int xdir; + int ydir; + + x2 = x_root - *x_off; + x_root += *x_off; + if (is_direction_fixed == True && (*xmotionp != 0 || *ymotionp != 0)) +@@ -3581,21 +3598,21 @@ + drag->x = orig->x + orig->width - drag->width; + } + if (*ymotionp == 1) + { + drag->y = orig->y + orig->height - drag->height; + } + if (!do_resize_opaque) + { + draw_move_resize_grid( + drag->x, drag->y, drag->width - 1, +- drag->height - 1); ++ drag->height - 1, do_outline_thin); + } + else + { + frame_setup_window( + exc->w.fw, drag->x, drag->y, drag->width, + drag->height, False); + } + } + DisplaySize(exc->w.fw, exc->x.elast, drag->width, drag->height, False, False); + +@@ -3640,20 +3657,21 @@ + int i; + size_borders b; + frame_move_resize_args mr_args = NULL; + long evmask; + XEvent ev; + int ref_x; + int ref_y; + int x_off; + int y_off; + direction_t dir; ++ Bool do_outline_thin = DO_RESIZE_OUTLINE_THIN(fw); + int warp_x = 0; + int warp_y = 0; + + bad_window = False; + ResizeWindow = FW_W_FRAME(fw); + if (fev_get_evpos_or_query(dpy, Scr.Root, exc->x.etrigger, &px, &py) == + False || + XTranslateCoordinates( + dpy, Scr.Root, ResizeWindow, px, py, &px, &py, + &JunkChild) == False) +@@ -3963,42 +3981,42 @@ + else + { + /* wait until the pointer hits a border before making a + * decision about the resize direction */ + } + + /* draw the rubber-band window */ + if (!do_resize_opaque) + { + draw_move_resize_grid( +- drag->x, drag->y, drag->width - 1, drag->height - 1); ++ drag->x, drag->y, drag->width - 1, drag->height - 1, do_outline_thin); + } + /* kick off resizing without requiring any motion if invoked with a key + * press */ + if (exc->x.elast->type == KeyPress) + { + int xo; + int yo; + + if (FQueryPointer( + dpy, Scr.Root, &JunkRoot, &JunkChild, &stashed_x, + &stashed_y, &JunkX, &JunkY, &JunkMask) == False) + { + /* pointer is on a different screen */ + stashed_x = 0; + stashed_y = 0; + } + xo = 0; + yo = 0; + __resize_step( + exc, stashed_x, stashed_y, &xo, &yo, drag, orig, +- &xmotion, &ymotion, do_resize_opaque, True); ++ &xmotion, &ymotion, do_resize_opaque, True, do_outline_thin); + } + else + { + stashed_x = stashed_y = -1; + } + + /* loop to resize */ + memset(&ev, 0, sizeof(ev)); + while (!is_finished && bad_window != FW_W(fw)) + { +@@ -4145,39 +4163,39 @@ + } + if (!fForceRedraw) + { + x = ev.xmotion.x_root; + y = ev.xmotion.y_root; + /* resize before paging request to prevent + * resize from lagging * mouse - mab */ + __resize_step( + exc, x, y, &x_off, &y_off, drag, orig, + &xmotion, &ymotion, do_resize_opaque, +- is_direction_fixed); ++ is_direction_fixed, do_outline_thin); + /* need to move the viewport */ + HandlePaging( + &ev, dx, dy, &x, &y, &delta_x, + &delta_y, False, False, False, + fw->edge_delay_ms_resize); + } + /* redraw outline if we paged - mab */ + if (delta_x != 0 || delta_y != 0) + { + sorig.x -= delta_x; + sorig.y -= delta_y; + drag->x -= delta_x; + drag->y -= delta_y; + + __resize_step( + exc, x, y, &x_off, &y_off, drag, orig, + &xmotion, &ymotion, do_resize_opaque, +- is_direction_fixed); ++ is_direction_fixed, do_outline_thin); + } + fForceRedraw = False; + is_done = True; + break; + + case PropertyNotify: + { + evh_args_t ea; + exec_context_changes_t ecc; + +@@ -4198,21 +4216,21 @@ + { + /* must undraw the rubber band in case the + * event causes some drawing */ + switch_move_resize_grid(False); + } + dispatch_event(&ev); + if (!do_resize_opaque) + { + draw_move_resize_grid( + drag->x, drag->y, drag->width - 1, +- drag->height - 1); ++ drag->height - 1, do_outline_thin); + } + } + else + { + if (do_resize_opaque) + { + /* only do this with opaque resizes, (i.e. the + * server is not grabbed) */ + BroadcastConfig(M_CONFIGURE_WINDOW, fw); + FlushAllMessageQueues(); +@@ -4251,21 +4269,21 @@ + int yo; + rectangle g; + + xo = 0; + yo = 0; + xmotion = 1; + ymotion = 1; + g = sorig; + __resize_step( + exc, sorig.x, sorig.y, &xo, &yo, &g, orig, +- &xmotion, &ymotion, do_resize_opaque, True); ++ &xmotion, &ymotion, do_resize_opaque, True, do_outline_thin); + } + if (vx != Scr.Vx || vy != Scr.Vy) + { + MoveViewport(vx, vy, False); + } + /* restore all geometry-related info */ + fw->g = g_backup; + if (bad_window == FW_W(fw)) + { + XUnmapWindow(dpy, FW_W_FRAME(fw)); +diff -U10 -r fvwm/style.c fvwm/style.c +--- fvwm/style.c 2011-12-09 18:29:08.011794436 +0100 ++++ fvwm/style.c 2011-12-09 18:38:57.690110903 +0100 +@@ -4057,20 +4057,26 @@ + S_SET_DO_RESIZE_OPAQUE(SCF(*ps), on); + S_SET_DO_RESIZE_OPAQUE(SCM(*ps), 1); + S_SET_DO_RESIZE_OPAQUE(SCC(*ps), 1); + } + else if (StrEquals(token, "ResizeOutline")) + { + S_SET_DO_RESIZE_OPAQUE(SCF(*ps), !on); + S_SET_DO_RESIZE_OPAQUE(SCM(*ps), 1); + S_SET_DO_RESIZE_OPAQUE(SCC(*ps), 1); + } ++ else if (StrEquals(token, "ResizeOutlineThin")) ++ { ++ S_SET_DO_RESIZE_OUTLINE_THIN(SCF(*ps), on); ++ S_SET_DO_RESIZE_OUTLINE_THIN(SCM(*ps), 1); ++ S_SET_DO_RESIZE_OUTLINE_THIN(SCC(*ps), 1); ++ } + else if (StrEquals(token, "RightTitleRotatedCW")) + { + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCF(*ps), on); + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCM(*ps), 1); + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCC(*ps), 1); + } + else if (StrEquals(token, "RightTitleRotatedCCW")) + { + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCF(*ps), !on); + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCM(*ps), 1); +diff -U10 -r fvwm/style.h fvwm/style.h +--- fvwm/style.h 2011-12-09 18:29:08.015127684 +0100 ++++ fvwm/style.h 2011-12-09 18:38:57.690110903 +0100 +@@ -225,20 +225,24 @@ + #define S_SET_DO_NOT_SHOW_ON_MAP(c,x) \ + ((c).s.do_not_show_on_map = !!(x)) + #define S_DO_RAISE_TRANSIENT(c) \ + ((c).s.do_raise_transient) + #define S_SET_DO_RAISE_TRANSIENT(c,x) \ + ((c).s.do_raise_transient = !!(x)) + #define S_DO_RESIZE_OPAQUE(c) \ + ((c).s.do_resize_opaque) + #define S_SET_DO_RESIZE_OPAQUE(c,x) \ + ((c).s.do_resize_opaque = !!(x)) ++#define S_DO_RESIZE_OUTLINE_THIN(c) \ ++ ((c).s.do_resize_outline_thin) ++#define S_SET_DO_RESIZE_OUTLINE_THIN(c,x) \ ++ ((c).s.do_resize_outline_thin = !!(x)) + #define S_DO_SHRINK_WINDOWSHADE(c) \ + ((c).s.do_shrink_windowshade) + #define S_SET_DO_SHRINK_WINDOWSHADE(c,x) \ + ((c).s.do_shrink_windowshade = !!(x)) + #define S_DO_STACK_TRANSIENT_PARENT(c) \ + ((c).s.do_stack_transient_parent) + #define S_SET_DO_STACK_TRANSIENT_PARENT(c,x) \ + ((c).s.do_stack_transient_parent = !!(x)) + #define S_DO_WINDOW_LIST_SKIP(c) \ + ((c).s.do_window_list_skip) +diff -U10 -r fvwm/window_flags.h fvwm/window_flags.h +--- fvwm/window_flags.h 2006-12-21 17:38:58.000000000 +0100 ++++ fvwm/window_flags.h 2011-12-09 18:38:57.690110903 +0100 +@@ -14,20 +14,22 @@ + ((fw)->flags.common.s.focus_policy) + + #define DO_LOWER_TRANSIENT(fw) \ + ((fw)->flags.common.s.do_lower_transient) + #define DO_NOT_SHOW_ON_MAP(fw) \ + ((fw)->flags.common.s.do_not_show_on_map) + #define DO_RAISE_TRANSIENT(fw) \ + ((fw)->flags.common.s.do_raise_transient) + #define DO_RESIZE_OPAQUE(fw) \ + ((fw)->flags.common.s.do_resize_opaque) ++#define DO_RESIZE_OUTLINE_THIN(fw) \ ++ ((fw)->flags.common.s.do_resize_outline_thin) + #define DO_SHRINK_WINDOWSHADE(fw) \ + ((fw)->flags.common.s.do_shrink_windowshade) + #define SET_DO_SHRINK_WINDOWSHADE(fw,x) \ + (fw)->flags.common.s.do_shrink_windowshade = !!(x) + #define SETM_DO_SHRINK_WINDOWSHADE(fw,x) \ + (fw)->flag_mask.common.s.do_shrink_windowshade = !!(x) + #define DO_SKIP_CIRCULATE(fw) \ + ((fw)->flags.common.s.do_circulate_skip) + #define SET_DO_SKIP_CIRCULATE(fw,x) \ + (fw)->flags.common.s.do_circulate_skip = !!(x) diff --git a/04-Conditionals.patch b/04-Conditionals.patch new file mode 100644 index 000000000000..d6adeb2e7adb --- /dev/null +++ b/04-Conditionals.patch @@ -0,0 +1,41 @@ +diff -U3 -r fvwm/conditional.c fvwm/conditional.c +--- fvwm/conditional.c 2007-10-06 11:17:09.000000000 +0200 ++++ fvwm/conditional.c 2011-12-09 19:01:48.868307776 +0100 +@@ -600,6 +600,36 @@ + SET_HAS_HANDLES(mask, on); + SETM_HAS_HANDLES(mask, 1); + } ++ else if (StrEquals(cond, "HasTitle")) ++ { ++ SET_HAS_TITLE(mask, on); ++ SETM_HAS_TITLE(mask, 1); ++ } ++ else if (StrEquals(cond, "HasBorders")) ++ { ++ SET_HAS_NO_BORDER(mask, !on); ++ SETM_HAS_NO_BORDER(mask, 1); ++ } ++ else if (StrEquals(cond, "TitleAtBottom")) ++ { ++ SET_TITLE_DIR(mask, DIR_S); ++ SETM_TITLE_DIR(mask, 1); ++ } ++ else if (StrEquals(cond, "TitleAtTop")) ++ { ++ SET_TITLE_DIR(mask, DIR_N); ++ SETM_TITLE_DIR(mask, 1); ++ } ++ else if (StrEquals(cond, "TitleAtLeft")) ++ { ++ SET_TITLE_DIR(mask, DIR_W); ++ SETM_TITLE_DIR(mask, 1); ++ } ++ else if (StrEquals(cond, "TitleAtRight")) ++ { ++ SET_TITLE_DIR(mask, DIR_E); ++ SETM_TITLE_DIR(mask, 1); ++ } + else if (StrEquals(cond,"Iconifiable")) + { + SET_IS_UNICONIFIABLE(mask, !on); +Seulement dans libs: PictureGraphics.c.orig diff --git a/05-FlatSeparators.patch b/05-FlatSeparators.patch new file mode 100644 index 000000000000..2746e8b9e914 --- /dev/null +++ b/05-FlatSeparators.patch @@ -0,0 +1,170 @@ +diff -U3 -r doc/commands/MenuStyle.xml doc/commands/MenuStyle.xml +--- doc/commands/MenuStyle.xml 2011-08-06 12:50:42.000000000 +0200 ++++ doc/commands/MenuStyle.xml 2011-12-09 19:19:30.364527517 +0100 +@@ -58,7 +58,7 @@ + PopupOffset, + TitleWarp / !TitleWarp, + TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2, +-SeparatorsLong / SeparatorsShort, ++SeparatorsLong / SeparatorsShort / FlatSeparators, + TrianglesSolid / TrianglesRelief, + PopupImmediately / PopupDelayed, + PopdownImmediately / PopdownDelayed, +@@ -436,6 +436,11 @@ + few pixels to the edges of the menu.</para> + + <para> ++<fvwmopt cmd="MenuStyle" opt="FlatSeparators"/> ++changes the separators so that they are a single pixel thick and ++colored the same as the text.</para> ++ ++<para> + <fvwmopt cmd="MenuStyle" opt="TrianglesSolid"/> and + <fvwmopt cmd="MenuStyle" opt="TrianglesRelief"/> + affect how the small triangles for sub menus is drawn. Solid +diff -U3 -r fvwm/menuitem.c fvwm/menuitem.c +--- fvwm/menuitem.c 2008-03-09 17:15:50.000000000 +0100 ++++ fvwm/menuitem.c 2011-12-09 19:19:30.364527517 +0100 +@@ -82,10 +82,14 @@ + * + */ + static void draw_separator( +- Window w, GC TopGC, GC BottomGC, int x1, int y, int x2) ++ Window w, GC TopGC, GC BottomGC, GC ForeGC, int x1, int y, int x2, ++ Bool do_flat_separators) + { + XDrawLine(dpy, w, TopGC , x1, y, x2, y); +- XDrawLine(dpy, w, BottomGC, x1-1, y+1, x2+1, y+1); ++ if (!do_flat_separators) ++ { ++ XDrawLine(dpy, w, BottomGC, x1-1, y+1, x2+1, y+1); ++ } + + return; + } +@@ -381,6 +385,7 @@ + /*Pixel fg, fgsh;*/ + int relief_thickness = ST_RELIEF_THICKNESS(ms); + Bool is_item_selected; ++ Bool do_flat_separators; + Bool item_cleared = False; + Bool xft_clear = False; + Bool empty_inter = False; +@@ -599,6 +604,8 @@ + * Draw the item itself. + */ + ++ do_flat_separators = ST_DO_FLAT_SEPARATOR(ms); ++ + /* Calculate the separator offsets. */ + if (ST_HAS_LONG_SEPARATORS(ms)) + { +@@ -619,9 +626,9 @@ + { + /* It's a separator. */ + draw_separator( +- mpip->w, gcs.shadow_gc, gcs.hilight_gc, sx1, +- y_offset + y_height - MENU_SEPARATOR_HEIGHT, +- sx2); ++ mpip->w, gcs.shadow_gc, gcs.hilight_gc, gcs.fore_gc, ++ sx1, y_offset + y_height - MENU_SEPARATOR_HEIGHT, ++ sx2, do_flat_separators); + /* Nothing else to do. */ + } + return; +@@ -661,8 +668,8 @@ + if (sx1 < sx2) + { + draw_separator( +- mpip->w, gcs.shadow_gc, gcs.hilight_gc, +- sx1, y, sx2); ++ mpip->w, gcs.shadow_gc, gcs.hilight_gc, gcs.fore_gc, ++ sx1, y, sx2, do_flat_separators); + } + } + /* Underline the title. */ +@@ -675,8 +682,8 @@ + { + y = y_offset + y_height - MENU_SEPARATOR_HEIGHT; + draw_separator( +- mpip->w, gcs.shadow_gc, gcs.hilight_gc, +- sx1, y, sx2); ++ mpip->w, gcs.shadow_gc, gcs.hilight_gc, gcs.fore_gc, ++ sx1, y, sx2, do_flat_separators); + } + break; + default: +diff -U3 -r fvwm/menus.c fvwm/menus.c +--- fvwm/menus.c 2011-12-09 19:01:48.851641536 +0100 ++++ fvwm/menus.c 2011-12-09 19:19:30.367860764 +0100 +@@ -1659,6 +1659,10 @@ + separator_height = (last_item_has_relief) ? + MENU_SEPARATOR_HEIGHT + relief_thickness : + MENU_SEPARATOR_TOTAL_HEIGHT; ++ if (MST_DO_FLAT_SEPARATOR(msp->menu)) ++ { ++ separator_height += 1; ++ } + MI_Y_OFFSET(mi) = y; + if (MI_IS_TITLE(mi)) + { +diff -U3 -r fvwm/menustyle.c fvwm/menustyle.c +--- fvwm/menustyle.c 2011-08-07 00:03:31.000000000 +0200 ++++ fvwm/menustyle.c 2011-12-09 19:23:29.135074081 +0100 +@@ -431,7 +431,7 @@ + "TrianglesUseFore", + "TitleColorset", "HilightTitleBack", + "TitleFont", +- "VerticalMargins", ++ "VerticalMargins", "FlatSeparators", + "UniqueHotkeyActivatesImmediate", + NULL + }; +@@ -901,6 +901,7 @@ + ST_SCROLL_OFF_PAGE(tmpms) = 1; + ST_DO_HILIGHT_TITLE_BACK(tmpms) = 0; + ST_USING_DEFAULT_TITLEFONT(tmpms) = True; ++ ST_DO_FLAT_SEPARATOR(tmpms) = 0; + has_gc_changed = True; + option = "fvwm"; + } +@@ -1606,6 +1607,9 @@ + case 63: /* UniqueHotKeyActivatesImmediate */ + ST_HOTKEY_ACTIVATES_IMMEDIATE(tmpms) = on; + break; ++ case 63: /* FlatSeparators */ ++ ST_DO_FLAT_SEPARATOR(tmpms) = on; ++ break; + + #if 0 + case 99: /* PositionHints */ +@@ -1864,6 +1868,8 @@ + ST_TRIANGLES_USE_FORE(destms) = ST_TRIANGLES_USE_FORE(origms); + /* Title */ + ST_DO_HILIGHT_TITLE_BACK(destms) = ST_DO_HILIGHT_TITLE_BACK(origms); ++ /* FlatSeparators */ ++ ST_DO_FLAT_SEPARATOR(destms) = ST_DO_FLAT_SEPARATOR(origms); + + menustyle_update(destms); + +Seulement dans fvwm: menustyle.c.rej +diff -U3 -r fvwm/menustyle.h fvwm/menustyle.h +--- fvwm/menustyle.h 2011-08-06 12:50:43.000000000 +0200 ++++ fvwm/menustyle.h 2011-12-09 19:19:30.367860764 +0100 +@@ -23,6 +23,8 @@ + #define MST_FACE(m) ((m)->s->ms->look.face) + #define ST_DO_HILIGHT_BACK(s) ((s)->look.flags.do_hilight_back) + #define MST_DO_HILIGHT_BACK(m) ((m)->s->ms->look.flags.do_hilight_back) ++#define ST_DO_FLAT_SEPARATOR(s) ((s)->look.flags.do_flat_separator) ++#define MST_DO_FLAT_SEPARATOR(m) ((m)->s->ms->look.flags.do_flat_separator) + #define ST_DO_HILIGHT_FORE(s) ((s)->look.flags.do_hilight_fore) + #define MST_DO_HILIGHT_FORE(m) ((m)->s->ms->look.flags.do_hilight_fore) + #define ST_DO_HILIGHT_TITLE_BACK(s) ((s)->look.flags.do_hilight_title_back) +@@ -282,6 +284,7 @@ + unsigned has_title_cset : 1; + unsigned do_hilight_title_back : 1; + unsigned using_default_titlefont : 1; ++ unsigned do_flat_separator : 1; + } flags; + unsigned char ReliefThickness; + unsigned char TitleUnderlines; diff --git a/06-BorderUnderTitle.patch b/06-BorderUnderTitle.patch new file mode 100644 index 000000000000..170670be4ef5 --- /dev/null +++ b/06-BorderUnderTitle.patch @@ -0,0 +1,210 @@ +diff -U3 -r fvwm/borders.c fvwm/borders.c +--- fvwm/borders.c 2011-12-09 19:19:30.354527773 +0100 ++++ fvwm/borders.c 2011-12-09 19:32:33.277812649 +0100 +@@ -4992,6 +4992,7 @@ + rectangle *ret_g, Window *ret_w) + { + int bw; ++ Bool title; + + bw = fw->boundary_width; + /* ret_g->x and ret->y is just an offset relatively to the w, +@@ -5062,7 +5063,32 @@ + ret_g->height = sidebar_g->y; + break; + default: +- return; ++ break; ++ } ++ ++ if (HAS_BORDER_UNDER_TITLE(fw)) ++ { ++ title = False; ++ switch (GET_TITLE_DIR(fw)) ++ { ++ case DIR_N: title = part & PART_TOP; break; ++ case DIR_E: title = part & PART_RIGHT; break; ++ case DIR_S: title = part & PART_BOTTOM; break; ++ case DIR_W: title = part & PART_LEFT; break; ++ } ++ if (title) ++ { ++ ret_g->width = max(ret_g->width, 2 * bw + fw->title_thickness); ++ ret_g->height = max(ret_g->height, 2 * bw + fw->title_thickness); ++ if (part & PART_RIGHT) ++ { ++ ret_g->x = 2 * sidebar_g->x + sidebar_g->width - ret_g->width; ++ } ++ if (part & PART_BOTTOM) ++ { ++ ret_g->y = 2 * sidebar_g->y + sidebar_g->height - ret_g->height; ++ } ++ } + } + + return; +diff -U3 -r fvwm/borders.h fvwm/borders.h +--- fvwm/borders.h 2003-06-29 21:53:23.000000000 +0200 ++++ fvwm/borders.h 2011-12-09 19:32:33.277812649 +0100 +@@ -36,7 +36,12 @@ + PART_FRAME = 0xff, + PART_TITLEBAR = 0x300, + PART_HANDLES = 0xc00, +- PART_ALL = 0xfff ++ PART_ALL = 0xfff, ++ ++ PART_TOP = 0x31, ++ PART_BOTTOM = 0xc2, ++ PART_LEFT = 0x58, ++ PART_RIGHT = 0xa4 + } window_parts; + + typedef enum +diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-12-09 19:19:30.357861021 +0100 ++++ fvwm/fvwm.h 2011-12-09 19:32:33.277812649 +0100 +@@ -271,6 +271,7 @@ + #define WINDOWSHADE_LAZY_MASK 0x3 + unsigned windowshade_laziness : 2; + unsigned use_title_decor_rotation : 1; ++ unsigned has_border_under_title : 1; + focus_policy_t focus_policy; + } s; + } common_flags_t; +diff -U3 -r fvwm/geometry.c fvwm/geometry.c +--- fvwm/geometry.c 2009-08-22 17:58:23.000000000 +0200 ++++ fvwm/geometry.c 2011-12-09 19:32:33.277812649 +0100 +@@ -46,6 +46,9 @@ + + /* ---------------------------- forward declarations ----------------------- */ + ++static void __get_window_borders( ++ const FvwmWindow *fw, size_borders *borders, Bool is_shaded); ++ + /* ---------------------------- local variables ---------------------------- */ + + /* ---------------------------- exported variables (globals) --------------- */ +@@ -343,7 +346,8 @@ + int big_height = big_g->height; + int d; + +- get_window_borders(fw, &b); ++ __get_window_borders(fw, &b, 1); ++ + *small_g = *big_g; + d = 0; + switch (SHADED_DIR(fw)) +@@ -469,23 +473,38 @@ + void get_window_borders( + const FvwmWindow *fw, size_borders *borders) + { ++ __get_window_borders(fw, borders, 0); ++} ++ ++static void __get_window_borders( ++ const FvwmWindow *fw, size_borders *borders, Bool is_shaded) ++{ ++ int title_thickness; ++ + borders->top_left.width = fw->boundary_width; + borders->bottom_right.width = fw->boundary_width; + borders->top_left.height = fw->boundary_width; + borders->bottom_right.height = fw->boundary_width; ++ ++ title_thickness = fw->title_thickness; ++ if (HAS_TITLE(fw) && HAS_BORDER_UNDER_TITLE(fw) && !is_shaded) ++ { ++ title_thickness += fw->boundary_width; ++ } ++ + switch (GET_TITLE_DIR(fw)) + { + case DIR_N: +- borders->top_left.height += fw->title_thickness; ++ borders->top_left.height += title_thickness; + break; + case DIR_S: +- borders->bottom_right.height += fw->title_thickness; ++ borders->bottom_right.height += title_thickness; + break; + case DIR_W: +- borders->top_left.width += fw->title_thickness; ++ borders->top_left.width += title_thickness; + break; + case DIR_E: +- borders->bottom_right.width += fw->title_thickness; ++ borders->bottom_right.width += title_thickness; + break; + } + borders->total_size.width = +diff -U3 -r fvwm/geometry.h fvwm/geometry.h +--- fvwm/geometry.h 2007-01-13 16:07:14.000000000 +0100 ++++ fvwm/geometry.h 2011-12-09 19:32:33.277812649 +0100 +@@ -44,6 +44,8 @@ + FvwmWindow *fw, rectangle *ret_g); + void get_window_borders( + const FvwmWindow *fw, size_borders *borders); ++void get_window_borders_shaded( ++ const FvwmWindow *fw, size_borders *borders); + void get_window_borders_no_title( + const FvwmWindow *fw, size_borders *borders); + void set_window_border_size( +Seulement dans fvwm: menustyle.c.rej +diff -U3 -r fvwm/style.c fvwm/style.c +--- fvwm/style.c 2011-12-09 19:19:30.361194269 +0100 ++++ fvwm/style.c 2011-12-09 19:32:33.274479401 +0100 +@@ -2259,6 +2259,12 @@ + { + rest = style_parse_button_style(ps, rest, on); + } ++ else if (StrEquals(token, "BORDERUNDERTITLE")) ++ { ++ S_SET_HAS_BORDER_UNDER_TITLE(SCF(*ps), on); ++ S_SET_HAS_BORDER_UNDER_TITLE(SCM(*ps), 1); ++ S_SET_HAS_BORDER_UNDER_TITLE(SCC(*ps), 1); ++ } + else if (StrEquals(token, "BorderWidth")) + { + if (GetIntegerArguments(rest, &rest, val, 1)) +@@ -5229,6 +5235,11 @@ + { + flags->do_update_rotated_title = 1; + } ++ ++ if (S_HAS_BORDER_UNDER_TITLE(SCC(*ret_style))) ++ { ++ flags->do_redecorate = True; ++ } + + /* has_mwm_border + * has_mwm_buttons */ +diff -U3 -r fvwm/style.h fvwm/style.h +--- fvwm/style.h 2011-12-09 19:19:30.361194269 +0100 ++++ fvwm/style.h 2011-12-09 19:32:33.274479401 +0100 +@@ -376,6 +376,10 @@ + ((c).s.use_title_decor_rotation) + #define S_SET_USE_TITLE_DECOR_ROTATION(c,x) \ + ((c).s.use_title_decor_rotation = !!(x)) ++#define S_HAS_BORDER_UNDER_TITLE(c) \ ++ ((c).s.has_border_under_title) ++#define S_SET_HAS_BORDER_UNDER_TITLE(c,x) \ ++ ((c).s.has_border_under_title = !!(x)) + #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \ + ((c).s.do_ewmh_mini_icon_override) + #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \ +diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h +--- fvwm/window_flags.h 2011-12-09 19:19:30.361194269 +0100 ++++ fvwm/window_flags.h 2011-12-09 19:32:33.277812649 +0100 +@@ -328,6 +328,12 @@ + (fw)->flags.common.s.use_title_decor_rotation = !!(x) + #define SETM_USE_TITLE_DECOR_ROTATION(fw,x) \ + (fw)->flag_mask.common.s.use_title_decor_rotation = !!(x) ++#define HAS_BORDER_UNDER_TITLE(fw) \ ++ ((fw)->flags.common.s.has_border_under_title) ++#define SET_HAS_BORDER_UNDER_TITLE(fw,x) \ ++ (fw)->flags.common.s.has_border_under_title = !!(x) ++#define SETM_HAS_BORDER_UNDER_TITLE(fw,x) \ ++ (fw)->flag_mask.common.s.has_border_under_title = !!(x) + + /* access to the special flags of a window */ + #define DO_REUSE_DESTROYED(fw) \ diff --git a/07-InactiveFont.patch b/07-InactiveFont.patch new file mode 100644 index 000000000000..c62a43e5f217 --- /dev/null +++ b/07-InactiveFont.patch @@ -0,0 +1,340 @@ +diff -U3 -r fvwm/add_window.c fvwm/add_window.c +--- fvwm/add_window.c 2011-09-27 23:07:20.000000000 +0200 ++++ fvwm/add_window.c 2011-12-09 19:40:50.151782172 +0100 +@@ -753,6 +753,18 @@ + fw->title_font = Scr.DefaultFont; + SET_USING_DEFAULT_WINDOW_FONT(fw, 1); + ++ if (IS_INACTIVE_WINDOW_FONT_LOADED(fw) && !USING_DEFAULT_INACTIVE_WINDOW_FONT(fw) && ++ fw->title_font != Scr.DefaultFont) ++ { ++ FlocaleUnloadFont(dpy, fw->title_font); ++ } ++ SET_INACTIVE_WINDOW_FONT_LOADED(fw, 0); ++ /* Fall back to default font. There are some race conditions when a ++ * window is destroyed and recaptured where an invalid font might be ++ * accessed otherwise. */ ++ fw->title_font = Scr.DefaultFont; ++ SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw, 1); ++ + return; + } + +@@ -1801,6 +1813,25 @@ + } + SET_WINDOW_FONT_LOADED(fw, 1); + } ++ /* load inactive font */ ++ if (!IS_INACTIVE_WINDOW_FONT_LOADED(fw)) ++ { ++ if (S_HAS_INACTIVE_WINDOW_FONT(SCF(*pstyle)) && ++ SGET_INACTIVE_WINDOW_FONT(*pstyle) && ++ (fw->inactive_title_font = ++ FlocaleLoadFont(dpy, SGET_INACTIVE_WINDOW_FONT(*pstyle), "FVWM"))) ++ { ++ SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw, 0); ++ } ++ else ++ { ++ /* no explicit font or failed to load, use active title font ++ * instead */ ++ fw->inactive_title_font = fw->title_font; ++ SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw, 1); ++ } ++ SET_INACTIVE_WINDOW_FONT_LOADED(fw, 1); ++ } + setup_title_geometry(fw, pstyle); + + return; +diff -U3 -r fvwm/borders.c fvwm/borders.c +--- fvwm/borders.c 2011-12-09 19:32:33.277812649 +0100 ++++ fvwm/borders.c 2011-12-09 19:44:44.919122542 +0100 +@@ -3921,7 +3921,7 @@ + + static void border_draw_title_mono( + FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd, +- FlocaleWinString *fstr, Pixmap dest_pix) ++ FlocaleWinString *fstr, Pixmap dest_pix, Bool do_hilight) + { + int has_vt; + +@@ -3931,7 +3931,8 @@ + td->offset - 2, 0, td->length+4, fw->title_thickness); + if (fw->visible_name != (char *)NULL) + { +- FlocaleDrawString(dpy, fw->title_font, fstr, 0); ++ FlocaleDrawString(dpy, do_hilight ? fw->title_font : ++ fw->inactive_title_font, fstr, 0); + } + /* for mono, we clear an area in the title bar where the window + * title goes, so that its more legible. For color, no need */ +@@ -3995,7 +3996,7 @@ + + static void border_draw_title_deep( + FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd, +- FlocaleWinString *fstr, Pixmap dest_pix, Window w) ++ FlocaleWinString *fstr, Pixmap dest_pix, Window w, Bool do_hilight) + { + DecorFace *df; + pixmap_background_type bg; +@@ -4017,14 +4018,15 @@ + 1); + } + } +- FlocaleDrawString(dpy, fw->title_font, &tdd->fstr, 0); ++ FlocaleDrawString(dpy, do_hilight ? fw->title_font : ++ fw->inactive_title_font, &tdd->fstr, 0); + + return; + } + + static void border_get_titlebar_draw_descr( + FvwmWindow *fw, titlebar_descr *td, title_draw_descr *tdd, +- Pixmap dest_pix) ++ Pixmap dest_pix, Bool do_hilight) + { + memset(tdd, 0, sizeof(*tdd)); + /* prepare the gcs and variables */ +@@ -4038,7 +4040,8 @@ + tdd->rgc = td->cd->relief_gc; + tdd->sgc = td->cd->shadow_gc; + } +- NewFontAndColor(fw->title_font, td->cd->fore_color, td->cd->back_color); ++ NewFontAndColor(do_hilight ? fw->title_font : fw->inactive_title_font, ++ td->cd->fore_color, td->cd->back_color); + tdd->tstyle = &TB_STATE( + GetDecor(fw, titlebar))[td->tbstate.tstate].style; + tdd->df = &TB_STATE(GetDecor(fw, titlebar))[td->tbstate.tstate]; +@@ -4075,7 +4078,7 @@ + } + + static void border_set_title_pixmap( +- FvwmWindow *fw, titlebar_descr *td, Pixmap *dest_pix, Window w) ++ FvwmWindow *fw, titlebar_descr *td, Pixmap *dest_pix, Window w, Bool do_hilight) + { + pixmap_background_type bg; + title_draw_descr tdd; +@@ -4083,7 +4086,7 @@ + Bool free_bg_pixmap = False; + rectangle pix_g; + +- border_get_titlebar_draw_descr(fw, td, &tdd, *dest_pix); ++ border_get_titlebar_draw_descr(fw, td, &tdd, *dest_pix, do_hilight); + /* prepare background, either from the window colour or from the + * border style */ + if (!DFS_USE_BORDER_STYLE(*tdd.tstyle)) +@@ -4151,11 +4154,11 @@ + + if (Pdepth < 2) + { +- border_draw_title_mono(fw, td, &tdd, &fstr, *dest_pix); ++ border_draw_title_mono(fw, td, &tdd, &fstr, *dest_pix, do_hilight); + } + else + { +- border_draw_title_deep(fw, td, &tdd, &fstr, *dest_pix, w); ++ border_draw_title_deep(fw, td, &tdd, &fstr, *dest_pix, w, do_hilight); + } + border_draw_title_relief(fw, td, &tdd, *dest_pix); + border_draw_title_stick_lines(fw, td, &tdd, *dest_pix); +@@ -4164,7 +4167,7 @@ + } + + static void border_draw_title( +- FvwmWindow *fw, titlebar_descr *td) ++ FvwmWindow *fw, titlebar_descr *td, Bool do_hilight) + { + Pixmap p; + +@@ -4182,7 +4185,7 @@ + #if 0 + fprintf(stderr,"drawing title\n"); + #endif +- border_set_title_pixmap(fw, td, &p, FW_W_TITLE(fw)); ++ border_set_title_pixmap(fw, td, &p, FW_W_TITLE(fw), do_hilight); + if (td->draw_rotation != ROTATION_0) + { + Pixmap tmp; +@@ -4671,9 +4674,9 @@ + if (fw->visible_name != (char *)NULL) + { + ret_td->length = FlocaleTextWidth( +- fw->title_font, fw->visible_name, +- (ret_td->has_vt) ? -strlen(fw->visible_name) : +- strlen(fw->visible_name)); ++ do_hilight ? fw->title_font : fw->inactive_title_font, ++ fw->visible_name, (ret_td->has_vt) ? ++ -strlen(fw->visible_name) : strlen(fw->visible_name)); + if (ret_td->length > fw->title_length - + 2*MIN_WINDOW_TITLE_TEXT_OFFSET) + { +@@ -4779,7 +4782,7 @@ + } + if ((draw_parts & PART_TITLE) != PART_NONE) + { +- border_draw_title(fw, &td); ++ border_draw_title(fw, &td, do_hilight); + } + if ((draw_parts & PART_BUTTONS) != PART_NONE) + { +diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-12-09 19:32:33.277812649 +0100 ++++ fvwm/fvwm.h 2011-12-09 19:40:50.148448924 +0100 +@@ -200,6 +200,7 @@ + unsigned has_icon_font : 1; + unsigned has_no_border : 1; + unsigned has_window_font : 1; ++ unsigned has_inactive_window_font : 1; + unsigned title_dir : 2; + unsigned user_states : 32; + /* static flags that do not change dynamically after the window has +@@ -363,11 +364,13 @@ + unsigned is_viewport_moved : 1; + unsigned is_window_being_moved_opaque : 1; + unsigned is_window_font_loaded : 1; ++ unsigned is_inactive_window_font_loaded : 1; + unsigned is_window_shaded : 1; + unsigned used_title_dir_for_shading : 1; + unsigned shaded_dir : 3; + unsigned using_default_icon_font : 1; + unsigned using_default_window_font : 1; ++ unsigned using_default_inactive_window_font : 1; + #define ICON_HINT_NEVER 0 + #define ICON_HINT_ONCE 1 + #define ICON_HINT_MULTIPLE 2 +@@ -679,6 +682,7 @@ + signed char icon_title_relief; + char *icon_font; + char *window_font; ++ char *inactive_window_font; + char *fore_color_name; + char *back_color_name; + char *fore_color_name_hi; +@@ -840,6 +844,7 @@ + + /* title font */ + FlocaleFont *title_font; ++ FlocaleFont *inactive_title_font; + /* /Y coordinate to draw the title name */ + short title_text_offset; + short title_length; +diff -U3 -r fvwm/style.c fvwm/style.c +--- fvwm/style.c 2011-12-09 19:32:33.274479401 +0100 ++++ fvwm/style.c 2011-12-09 19:40:50.148448924 +0100 +@@ -452,6 +452,22 @@ + *merged_style, SGET_WINDOW_FONT(*add_style)); + } + } ++ if (S_HAS_INACTIVE_WINDOW_FONT(SCF(*add_style))) ++ { ++ if (do_free_src_and_alloc_copy) ++ { ++ SAFEFREE(SGET_INACTIVE_WINDOW_FONT(*merged_style)); ++ SSET_INACTIVE_WINDOW_FONT( ++ *merged_style, (SGET_INACTIVE_WINDOW_FONT(*add_style)) ? ++ safestrdup(SGET_INACTIVE_WINDOW_FONT(*add_style)) : ++ NULL); ++ } ++ else ++ { ++ SSET_INACTIVE_WINDOW_FONT( ++ *merged_style, SGET_INACTIVE_WINDOW_FONT(*add_style)); ++ } ++ } + if (add_style->flags.use_start_on_desk) + { + SSET_START_DESK(*merged_style, SGET_START_DESK(*add_style)); +@@ -943,6 +959,10 @@ + { + SAFEFREE(SGET_WINDOW_FONT(*style)); + } ++ if (pmask->common.has_inactive_window_font) ++ { ++ SAFEFREE(SGET_INACTIVE_WINDOW_FONT(*style)); ++ } + if (pmask->has_icon) + { + SAFEFREE(SGET_ICON_NAME(*style)); +@@ -3381,6 +3401,15 @@ + S_SET_IS_UNICONIFIABLE(SCM(*ps), 1); + S_SET_IS_UNICONIFIABLE(SCC(*ps), 1); + } ++ else if (StrEquals(token, "InactiveFont")) ++ { ++ SAFEFREE(SGET_INACTIVE_WINDOW_FONT(*ps)); ++ rest = GetNextToken(rest, &token); ++ SSET_INACTIVE_WINDOW_FONT(*ps, token); ++ S_SET_HAS_INACTIVE_WINDOW_FONT(SCF(*ps), (token != NULL)); ++ S_SET_HAS_INACTIVE_WINDOW_FONT(SCM(*ps), 1); ++ S_SET_HAS_INACTIVE_WINDOW_FONT(SCC(*ps), 1); ++ } + else if (StrEquals(token, "IndexedWindowName")) + { + /* TA: This is being deprecated in favour of the more +@@ -5261,6 +5290,12 @@ + flags->do_update_window_font = 1; + } + ++ /* has_inactive_window_font */ ++ if (S_HAS_INACTIVE_WINDOW_FONT(SCC(*ret_style))) ++ { ++ flags->do_update_window_font = True; ++ } ++ + /* has_stippled_title */ + if (S_HAS_STIPPLED_TITLE(SCC(*ret_style)) || + S_HAS_NO_STICKY_STIPPLED_TITLE(SCC(*ret_style)) || +diff -U3 -r fvwm/style.h fvwm/style.h +--- fvwm/style.h 2011-12-09 19:32:33.274479401 +0100 ++++ fvwm/style.h 2011-12-09 19:40:50.148448924 +0100 +@@ -300,6 +300,10 @@ + ((c).has_window_font) + #define S_SET_HAS_WINDOW_FONT(c,x) \ + ((c).has_window_font = !!(x)) ++#define S_HAS_INACTIVE_WINDOW_FONT(c) \ ++ ((c).has_inactive_window_font) ++#define S_SET_HAS_INACTIVE_WINDOW_FONT(c,x) \ ++ ((c).has_inactive_window_font = !!(x)) + #define S_ICON_OVERRIDE(c) \ + ((c).s.icon_override) + #define S_SET_ICON_OVERRIDE(c,x) \ +@@ -496,6 +500,10 @@ + ((s).window_font) + #define SSET_WINDOW_FONT(s,x) \ + ((s).window_font = (x)) ++#define SGET_INACTIVE_WINDOW_FONT(s) \ ++ ((s).inactive_window_font) ++#define SSET_INACTIVE_WINDOW_FONT(s,x) \ ++ ((s).inactive_window_font = (x)) + #define SGET_COLORSET(s) \ + ((s).colorset) + #define SSET_COLORSET(s,x) \ +diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h +--- fvwm/window_flags.h 2011-12-09 19:32:33.277812649 +0100 ++++ fvwm/window_flags.h 2011-12-09 19:40:50.151782172 +0100 +@@ -580,6 +580,12 @@ + (fw)->flags.is_window_font_loaded = !!(x) + #define SETM_WINDOW_FONT_LOADED(fw,x) \ + (fw)->flag_mask.is_window_font_loaded = !!(x) ++#define IS_INACTIVE_WINDOW_FONT_LOADED(fw) \ ++ ((fw)->flags.is_inactive_window_font_loaded) ++#define SET_INACTIVE_WINDOW_FONT_LOADED(fw,x) \ ++ (fw)->flags.is_inactive_window_font_loaded = !!(x) ++#define SETM_INACTIVE_WINDOW_FONT_LOADED(fw,x) \ ++ (fw)->flag_mask.is_inactive_window_font_loaded = !!(x) + #define CR_MOTION_METHOD(fw) \ + ((fw)->flags.cr_motion_method) + #define SET_CR_MOTION_METHOD(fw,x) \ +@@ -622,6 +628,12 @@ + (fw)->flags.using_default_window_font = !!(x) + #define SETM_USING_DEFAULT_WINDOW_FONT(fw,x) \ + (fw)->flag_mask.using_default_window_font = !!(x) ++#define USING_DEFAULT_INACTIVE_WINDOW_FONT(fw) \ ++ ((fw)->flags.using_default_inactive_window_font) ++#define SET_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw,x) \ ++ (fw)->flags.using_default_inactive_window_font = !!(x) ++#define SETM_USING_DEFAULT_INACTIVE_WINDOW_FONT(fw,x) \ ++ (fw)->flag_mask.using_default_inactive_window_font = !!(x) + #define USING_DEFAULT_ICON_FONT(fw) \ + ((fw)->flags.using_default_icon_font) + #define SET_USING_DEFAULT_ICON_FONT(fw,x) \ diff --git a/08-FluxRoundedCorners.patch b/08-FluxRoundedCorners.patch new file mode 100644 index 000000000000..596012d3706d --- /dev/null +++ b/08-FluxRoundedCorners.patch @@ -0,0 +1,864 @@ +diff -U3 -r fvwm/add_window.c fvwm/add_window.c +--- fvwm/add_window.c 2011-12-09 19:40:50.151782172 +0100 ++++ fvwm/add_window.c 2011-12-09 19:51:38.701855458 +0100 +@@ -1766,6 +1766,7 @@ + { + int width; + int offset; ++ style_flags *sflags = &(pstyle->flags); + + get_title_font_size_and_offset( + fw, S_TITLE_DIR(SCF(*pstyle)), +@@ -1777,6 +1778,10 @@ + fw->title_thickness = width; + fw->title_text_offset = offset; + fw->corner_width = fw->title_thickness + fw->boundary_width; ++ if (SHAS_CORNER_WIDTH(sflags)) ++ { ++ fw->corner_width = SGET_CORNER_WIDTH(*pstyle); ++ } + if (!HAS_TITLE(fw)) + { + fw->title_thickness = 0; +@@ -2714,6 +2719,8 @@ + fw = NULL; + } + ++ frame_make_rounded_corners(fw); ++ + return fw; + } + +diff -U3 -r fvwm/borders.c fvwm/borders.c +--- fvwm/borders.c 2011-12-09 19:44:44.919122542 +0100 ++++ fvwm/borders.c 2011-12-09 19:51:38.705188705 +0100 +@@ -1754,6 +1754,24 @@ + return; + } + ++static void border_fill_fluxbox_handle( ++ Pixmap dest_pix, rectangle *dest_g, common_decorations_type *cd, Bool corner) ++{ ++ corner = False; ++ /* Main Color */ ++ XFillRectangle( ++ dpy, dest_pix, corner ? cd->shadow_gc : cd->relief_gc, dest_g->x + 1, dest_g->y + 1, ++ dest_g->width - dest_g->x - 3, dest_g->height - dest_g->y - 2); ++ /* Right Shadow */ ++ XFillRectangle( ++ dpy, dest_pix, cd->shadow_gc, dest_g->x + dest_g->width - 2, dest_g->y + 1, ++ 1, dest_g->height - dest_g->y - 2); ++ /* Bottom Shadow */ ++ XFillRectangle( ++ dpy, dest_pix, cd->shadow_gc, dest_g->x + 1, dest_g->height - 2, ++ dest_g->width - dest_g->x - 3, 1); ++} ++ + /* create a root transparent colorset bg, we take in account a possible + * drawing rotation */ + static Pixmap border_create_root_transparent_pixmap( +@@ -1998,12 +2016,28 @@ + pix_g.width = part_g.width; + pix_g.height = part_g.height; + border_fill_pixmap_background(p, &pix_g, &bg, cd); ++ if (HAS_FLUXBOX_HANDLES(fw) && (part & PART_BOTTOM)) ++ { ++ pix_g.y = part_g.height - fw->boundary_width; ++ if (part != PART_BORDER_S) ++ { ++ pix_g.width++; ++ } ++ if (part == PART_BORDER_SE) ++ { ++ pix_g.x--; ++ } ++ if (fw->boundary_width > 2) ++ { ++ border_fill_fluxbox_handle(p, &pix_g, cd, !(part & PART_BORDER_S)); ++ } ++ } + if (free_bg_pixmap && bg.pixmap.p) + { + XFreePixmap(dpy, bg.pixmap.p); + } + /* draw the relief over the background */ +- if (!br->relief.is_flat) ++ if (!br->relief.is_flat && !HAS_FLUXBOX_HANDLES(fw)) + { + border_draw_part_relief(br, frame_g, &part_g, p, is_inverted); + /* draw the handle marks */ +@@ -4523,6 +4557,9 @@ + JustificationType just; + int lbl = 0; + int rbl = 0; ++ int bw; ++ ++ bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width; + + ret_td->cd = cd; + ret_td->frame_g = *new_g; +@@ -4560,16 +4597,16 @@ + /* geometry of the title bar title + buttons */ + if (!ret_td->has_vt) + { +- ret_td->bar_g.width = new_g->width - 2 * fw->boundary_width; ++ ret_td->bar_g.width = new_g->width - 2 * bw; + ret_td->bar_g.height = ret_td->layout.title_g.height; +- ret_td->bar_g.x = fw->boundary_width; ++ ret_td->bar_g.x = bw; + ret_td->bar_g.y = ret_td->layout.title_g.y; + } + else + { + ret_td->bar_g.width = ret_td->layout.title_g.width; +- ret_td->bar_g.height = new_g->height - 2 * fw->boundary_width; +- ret_td->bar_g.y = fw->boundary_width; ++ ret_td->bar_g.height = new_g->height - 2 * bw; ++ ret_td->bar_g.y = bw; + ret_td->bar_g.x = ret_td->layout.title_g.x; + } + +@@ -4621,7 +4658,7 @@ + { + ret_td->left_buttons_g.height = rbl; + ret_td->right_buttons_g.height = lbl; +- ret_td->right_buttons_g.y = fw->boundary_width; ++ ret_td->right_buttons_g.y = bw; + ret_td->right_buttons_g.x = ret_td->bar_g.x; + ret_td->left_buttons_g.y = ret_td->layout.title_g.y + + ret_td->layout.title_g.height; +@@ -4631,7 +4668,7 @@ + { + ret_td->left_buttons_g.width = rbl; + ret_td->right_buttons_g.width = lbl; +- ret_td->right_buttons_g.x = fw->boundary_width; ++ ret_td->right_buttons_g.x = bw; + ret_td->right_buttons_g.y = ret_td->bar_g.y; + ret_td->left_buttons_g.x = ret_td->layout.title_g.x + + ret_td->layout.title_g.width; +@@ -4644,7 +4681,7 @@ + { + ret_td->left_buttons_g.height = lbl; + ret_td->right_buttons_g.height = rbl; +- ret_td->left_buttons_g.y = fw->boundary_width; ++ ret_td->left_buttons_g.y = bw; + ret_td->left_buttons_g.x = ret_td->bar_g.x; + ret_td->right_buttons_g.y = ret_td->layout.title_g.y + + ret_td->layout.title_g.height; +@@ -4654,7 +4691,7 @@ + { + ret_td->left_buttons_g.width = lbl; + ret_td->right_buttons_g.width = rbl; +- ret_td->left_buttons_g.x = fw->boundary_width; ++ ret_td->left_buttons_g.x = bw; + ret_td->left_buttons_g.y = ret_td->bar_g.y; + ret_td->right_buttons_g.x = ret_td->layout.title_g.x + + ret_td->layout.title_g.width; +@@ -4997,7 +5034,7 @@ + int bw; + Bool title; + +- bw = fw->boundary_width; ++ bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width; + /* ret_g->x and ret->y is just an offset relatively to the w, + * maybe we can take the relief in account? */ + switch (part) +@@ -5015,6 +5052,10 @@ + case PART_BORDER_S: + ret_g->x = sidebar_g->x; + ret_g->y = 2 * sidebar_g->y + sidebar_g->height - bw; ++ if (HAS_FLUXBOX_HANDLES(fw)) ++ { ++ ret_g->y = 2 * sidebar_g->y + sidebar_g->height - fw->boundary_width; ++ } + *ret_w = FW_W_SIDE(fw, 2); + break; + case PART_BORDER_W: +@@ -5049,9 +5090,14 @@ + switch (part) + { + case PART_BORDER_N: ++ ret_g->height = bw; + case PART_BORDER_S: + ret_g->width = sidebar_g->width; + ret_g->height = bw; ++ if (HAS_FLUXBOX_HANDLES(fw)) ++ { ++ ret_g->height = fw->boundary_width; ++ } + break; + case PART_BORDER_E: + case PART_BORDER_W: +diff -U3 -r fvwm/frame.c fvwm/frame.c +--- fvwm/frame.c 2011-08-07 00:03:31.000000000 +0200 ++++ fvwm/frame.c 2011-12-09 19:51:38.705188705 +0100 +@@ -436,6 +436,8 @@ + /* inform the modules of the change */ + BroadcastConfig(M_CONFIGURE_WINDOW,fw); + ++ frame_make_rounded_corners(fw); ++ + return; + } + +@@ -1954,6 +1956,7 @@ + FShapeSet); + } + frame_setup_shape(fw, mra->end_g.width, mra->end_g.height, fw->wShaped); ++ frame_make_rounded_corners(fw); + if (mra->flags.do_restore_gravity) + { + mra->grav.client_grav = fw->hints.win_gravity; +@@ -2075,6 +2078,210 @@ + return; + } + ++void draw_rounded_mask(Window win, int width, int height, Bool slightlyrounded, window_parts draw_parts, int col) ++{ ++ Pixmap pm; ++ GC gc; ++ rectangle rect; ++ int w,h; ++ unsigned long valuemask; ++ int x; ++ int lstart, lend; ++ int l0[] = { 0, 1, 0, 1, 2, 3 }; ++ int l1[] = { 1, 2, 1, 2, 3, 5 }; ++ int l2[] = { 2, 1, 5, 3, 2, 1 }; ++ int l3[] = { 1, 1, 1, 1, 1, 2 }; ++ ++ if (slightlyrounded) ++ { ++ lstart = 0; ++ lend = 2; ++ } ++ else ++ { ++ lstart = 2; ++ lend = 6; ++ } ++ ++ XGetGeometry( ++ dpy, win, &JunkRoot, &rect.x, &rect.y, ++ &rect.width, &rect.height, &JunkBW, &JunkDepth); ++ ++ w = rect.width; ++ h = rect.height; ++ pm = XCreatePixmap(dpy, win, width, height, 1); ++ gc = Scr.MonoGC; ++ XSetForeground(dpy, gc, !col); ++ XFillRectangle(dpy, pm, gc, 0, 0, w, h); ++ XSetForeground(dpy, gc, col); ++ ++ /* Draw a rounded shape on the corners of the pixmap */ ++ for (x = lstart; x < lend; x++) ++ { ++ if (draw_parts & PART_BORDER_NW) ++ { ++ XFillRectangle(dpy, pm, gc, 0, l0[x], l2[x], l3[x]); ++ } ++ if (draw_parts & PART_BORDER_NE) ++ { ++ XFillRectangle(dpy, pm, gc, w-l2[x], l0[x], l2[x], l3[x]); ++ } ++ if (draw_parts & PART_BORDER_SW) ++ { ++ XFillRectangle(dpy, pm, gc, 0, h-l1[x], l2[x], l3[x]); ++ } ++ if (draw_parts & PART_BORDER_SE) ++ { ++ XFillRectangle(dpy, pm, gc, w-l2[x], h-l1[x], l2[x], l3[x]); ++ } ++ } ++ ++ FShapeCombineMask(dpy, win, ShapeBounding, 0, 0, pm, col==1 ? ShapeSubtract : ShapeSet); ++ ++ XFreePixmap(dpy, pm); ++} ++ ++static void frame_draw_rounded_mask(FvwmWindow *fw, Window win, window_parts draw_parts, int col) ++{ ++ draw_rounded_mask(win, fw->g.frame.width, fw->g.frame.height, ++ HAS_SLIGHTLY_ROUNDED_CORNERS(fw), IS_MAXIMIZED(fw)?0:draw_parts, col); ++} ++ ++/* Returns a corner corrected for rotation of the titlebar (ie button 1 is always NW) */ ++#define SWAP_CORNER(PART) corner = corner & (PART) ? corner ^ (PART) : corner ++static window_parts __get_corner(window_parts corner, FvwmWindow *fw) ++{ ++ int dir; ++ ++ dir = GET_TITLE_DIR(fw); ++ ++ /* Flip horizontally (relative to tb) if the titlebar is rotated */ ++ if ((dir == DIR_N && IS_TOP_TITLE_ROTATED(fw)) ++ || (dir == DIR_S && !IS_BOTTOM_TITLE_ROTATED(fw)) ++ || (dir == DIR_W && IS_LEFT_TITLE_ROTATED_CW(fw)) ++ || (dir == DIR_E && !IS_RIGHT_TITLE_ROTATED_CW(fw))) ++ { ++ SWAP_CORNER(PART_BORDER_NE | PART_BORDER_NW); ++ } ++ ++ /* Swap SE/SW so that shift left goes in a clockwise order */ ++ SWAP_CORNER(PART_BORDER_SW | PART_BORDER_SE); ++ ++ /* Rotate clockwise depending on dir */ ++ corner <<= dir; ++ if (corner > PART_BORDER_SE) ++ { ++ corner = corner >> 4; ++ } ++ ++ /* Swap SE/SW back */ ++ SWAP_CORNER(PART_BORDER_SW | PART_BORDER_SE); ++ ++ return corner; ++} ++ ++void frame_make_rounded_corners(FvwmWindow *fw) ++{ ++ rectangle rect; ++ window_parts draw_parts; ++ window_parts mask; ++ int x; ++ FvwmWindow *left_button = 0; ++ FvwmWindow *right_button = 0; ++ ++ if (!fw || !FShapesSupported) ++ { ++ return; ++ } ++ ++ window_parts corner_nw = __get_corner(PART_BORDER_NW, fw); ++ window_parts corner_ne = __get_corner(PART_BORDER_NE, fw); ++ window_parts corner_se = __get_corner(PART_BORDER_SE, fw); ++ window_parts corner_sw = __get_corner(PART_BORDER_SW, fw); ++ ++ for (x = 9;x>=0;x--) ++ { ++ if (FW_W_BUTTON(fw, x) != None) ++ { ++ if (x%2 == 0) ++ { ++ left_button = FW_W_BUTTON(fw, x); ++ } ++ else ++ { ++ right_button = FW_W_BUTTON(fw, x); ++ } ++ } ++ } ++ ++ mask = 0; ++ if (HAS_ROUNDED_CORNERS_TOP(fw)) ++ { ++ mask |= corner_ne | corner_nw; ++ } ++ if (HAS_ROUNDED_CORNERS_BOTTOM(fw)) ++ { ++ mask |= corner_se | corner_sw; ++ } ++ ++ /* Draw mask on each corner of the window. This involves the frame, title, ++ * buttons and parent wins depending on the window configuration */ ++ rect = fw->g.frame; ++ frame_draw_rounded_mask(fw, FW_W_FRAME(fw), mask, 1); ++ if (HAS_TITLE(fw)) ++ { ++ draw_parts = 0; ++ if (!left_button) ++ { ++ draw_parts |= corner_nw; ++ } ++ if (!right_button) ++ { ++ draw_parts |= corner_ne; ++ } ++ if (IS_SHADED(fw)) ++ { ++ if (!left_button) ++ { ++ draw_parts |= corner_sw; ++ } ++ else ++ { ++ frame_draw_rounded_mask(fw, left_button, mask & (corner_nw|corner_sw), 0); ++ } ++ if (!right_button) ++ { ++ draw_parts |= corner_se; ++ } ++ else ++ { ++ frame_draw_rounded_mask(fw, right_button, mask & (corner_ne|corner_se), 0); ++ } ++ } ++ frame_draw_rounded_mask(fw, FW_W_TITLE(fw), mask & draw_parts, 0); ++ ++ if (!IS_SHADED(fw)) ++ { ++ frame_draw_rounded_mask(fw, FW_W_PARENT(fw), mask & (corner_sw|corner_se), 0); ++ ++ if (left_button) ++ { ++ frame_draw_rounded_mask(fw, left_button, mask & corner_nw, 0); ++ } ++ if (right_button) ++ { ++ frame_draw_rounded_mask(fw, right_button, mask & corner_ne, 0); ++ } ++ } ++ } ++ else ++ { ++ frame_draw_rounded_mask(fw, FW_W_PARENT(fw), mask & PART_CORNERS, 0); ++ } ++ ++ XFlush(dpy); ++} ++ + /**************************************************************************** + * + * Sets up the shaped window borders +diff -U3 -r fvwm/frame.h fvwm/frame.h +--- fvwm/frame.h 2007-01-13 14:16:34.000000000 +0100 ++++ fvwm/frame.h 2011-12-09 19:51:38.705188705 +0100 +@@ -5,6 +5,8 @@ + + /* ---------------------------- included header files ---------------------- */ + ++#include "borders.h" ++ + /* ---------------------------- global definitions ------------------------- */ + + /* ---------------------------- global macros ------------------------------ */ +@@ -71,5 +73,7 @@ + Bool do_send_configure_notify); + void frame_setup_shape( + FvwmWindow *fw, int w, int h, int shape_mode); ++void frame_make_rounded_corners(FvwmWindow *fw); ++void draw_rounded_mask(Window win, int width, int height, Bool slightlyrounded, window_parts draw_parts, int col); + + #endif /* FRAME_H */ +diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-12-09 19:40:50.148448924 +0100 ++++ fvwm/fvwm.h 2011-12-09 19:51:38.705188705 +0100 +@@ -273,6 +273,10 @@ + unsigned windowshade_laziness : 2; + unsigned use_title_decor_rotation : 1; + unsigned has_border_under_title : 1; ++ unsigned has_fluxbox_handles : 1; ++ unsigned has_rounded_corners_top : 1; ++ unsigned has_rounded_corners_bottom : 1; ++ unsigned has_slightly_rounded_corners : 1; + focus_policy_t focus_policy; + } s; + } common_flags_t; +@@ -551,6 +555,7 @@ + unsigned has_edge_resistance_move : 1; + unsigned has_edge_resistance_xinerama_move : 1; + unsigned has_handle_width : 1; ++ unsigned has_corner_width : 1; + unsigned has_icon : 1; + unsigned has_icon_boxes : 1; + unsigned has_icon_size_limits : 1; +@@ -713,6 +718,7 @@ + short border_width; + /* resize handle width */ + short handle_width; ++ short corner_width; + int layer; + int start_desk; + int start_page_x; +diff -U3 -r fvwm/geometry.c fvwm/geometry.c +--- fvwm/geometry.c 2011-12-09 19:40:50.145115675 +0100 ++++ fvwm/geometry.c 2011-12-09 19:51:38.705188705 +0100 +@@ -480,16 +480,18 @@ + const FvwmWindow *fw, size_borders *borders, Bool is_shaded) + { + int title_thickness; ++ int bw; + +- borders->top_left.width = fw->boundary_width; +- borders->bottom_right.width = fw->boundary_width; +- borders->top_left.height = fw->boundary_width; ++ bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width; ++ borders->top_left.width = bw; ++ borders->bottom_right.width = bw; ++ borders->top_left.height = bw; + borders->bottom_right.height = fw->boundary_width; + + title_thickness = fw->title_thickness; + if (HAS_TITLE(fw) && HAS_BORDER_UNDER_TITLE(fw) && !is_shaded) + { +- title_thickness += fw->boundary_width; ++ title_thickness += bw; + } + + switch (GET_TITLE_DIR(fw)) +@@ -519,9 +521,13 @@ + void get_window_borders_no_title( + const FvwmWindow *fw, size_borders *borders) + { +- borders->top_left.width = fw->boundary_width; +- borders->bottom_right.width = fw->boundary_width; +- borders->top_left.height = fw->boundary_width; ++ int bw; ++ ++ bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width; ++ ++ borders->top_left.width = bw; ++ borders->bottom_right.width = bw; ++ borders->top_left.height = bw; + borders->bottom_right.height = fw->boundary_width; + borders->total_size.width = + borders->top_left.width + borders->bottom_right.width; +diff -U3 -r fvwm/menus.c fvwm/menus.c +--- fvwm/menus.c 2011-12-09 19:40:50.138449178 +0100 ++++ fvwm/menus.c 2011-12-09 19:51:38.708521953 +0100 +@@ -67,6 +67,7 @@ + #include "menugeometry.h" + #include "menuparameters.h" + #include "menus.h" ++#include "frame.h" + #include "libs/FGettext.h" + + /* ---------------------------- local definitions -------------------------- */ +@@ -3191,6 +3192,13 @@ + return x_overlap; + } + ++static void menu_make_rounded_corners(MenuRoot *mr) ++{ ++ draw_rounded_mask(MR_WINDOW(mr), MR_WIDTH(mr), MR_HEIGHT(mr), ++ MST_HAS_SLIGHTLY_ROUNDED_CORNERS(mr), ++ MST_HAS_ROUNDED_CORNERS(mr)?PART_CORNERS:0, 0); ++} ++ + /* + * + * Procedure: +@@ -3764,6 +3772,8 @@ + * Pop up the menu + */ + ++ menu_make_rounded_corners(mr); ++ + XMoveWindow(dpy, MR_WINDOW(mr), x, y); + MR_X(mr) = x; + MR_Y(mr) = y; +diff -U3 -r fvwm/menustyle.c fvwm/menustyle.c +--- fvwm/menustyle.c 2011-12-09 19:40:50.138449178 +0100 ++++ fvwm/menustyle.c 2011-12-09 20:14:42.916305166 +0100 +@@ -432,6 +432,7 @@ + "TitleColorset", "HilightTitleBack", + "TitleFont", + "VerticalMargins", "FlatSeparators", ++ "RoundedCorners", "SlightlyRoundedCorners", + "UniqueHotkeyActivatesImmediate", + NULL + }; +@@ -1604,12 +1605,18 @@ + &ST_VERTICAL_MARGIN_BOTTOM(tmpms), + 0, 0); + break; +- case 63: /* UniqueHotKeyActivatesImmediate */ +- ST_HOTKEY_ACTIVATES_IMMEDIATE(tmpms) = on; +- break; + case 63: /* FlatSeparators */ + ST_DO_FLAT_SEPARATOR(tmpms) = on; + break; ++ case 64: /* UniqueHotKeyActivatesImmediate */ ++ ST_HOTKEY_ACTIVATES_IMMEDIATE(tmpms) = on; ++ break; ++ case 65: /* RoundedCorners */ ++ ST_HAS_ROUNDED_CORNERS(tmpms) = on; ++ break; ++ case 66: /* SlightlyRoundedCorners */ ++ ST_HAS_SLIGHTLY_ROUNDED_CORNERS(tmpms) = on; ++ break; + + #if 0 + case 99: /* PositionHints */ +diff -U3 -r fvwm/menustyle.h fvwm/menustyle.h +--- fvwm/menustyle.h 2011-12-09 19:40:50.141782426 +0100 ++++ fvwm/menustyle.h 2011-12-09 19:51:38.708521953 +0100 +@@ -25,6 +25,10 @@ + #define MST_DO_HILIGHT_BACK(m) ((m)->s->ms->look.flags.do_hilight_back) + #define ST_DO_FLAT_SEPARATOR(s) ((s)->look.flags.do_flat_separator) + #define MST_DO_FLAT_SEPARATOR(m) ((m)->s->ms->look.flags.do_flat_separator) ++#define ST_HAS_ROUNDED_CORNERS(s) ((s)->look.flags.has_rounded_corners) ++#define MST_HAS_ROUNDED_CORNERS(m) ((m)->s->ms->look.flags.has_rounded_corners) ++#define ST_HAS_SLIGHTLY_ROUNDED_CORNERS(s) ((s)->look.flags.has_slightly_rounded_corners) ++#define MST_HAS_SLIGHTLY_ROUNDED_CORNERS(m) ((m)->s->ms->look.flags.has_slightly_rounded_corners) + #define ST_DO_HILIGHT_FORE(s) ((s)->look.flags.do_hilight_fore) + #define MST_DO_HILIGHT_FORE(m) ((m)->s->ms->look.flags.do_hilight_fore) + #define ST_DO_HILIGHT_TITLE_BACK(s) ((s)->look.flags.do_hilight_title_back) +@@ -285,6 +289,8 @@ + unsigned do_hilight_title_back : 1; + unsigned using_default_titlefont : 1; + unsigned do_flat_separator : 1; ++ unsigned has_rounded_corners : 1; ++ unsigned has_slightly_rounded_corners : 1; + } flags; + unsigned char ReliefThickness; + unsigned char TitleUnderlines; +diff -U3 -r fvwm/style.c fvwm/style.c +--- fvwm/style.c 2011-12-09 19:40:50.148448924 +0100 ++++ fvwm/style.c 2011-12-09 19:51:38.708521953 +0100 +@@ -565,6 +565,10 @@ + SSET_HANDLE_WIDTH( + *merged_style, SGET_HANDLE_WIDTH(*add_style)); + } ++ if (add_style->flags.has_corner_width) ++ { ++ SSET_CORNER_WIDTH(*merged_style, SGET_CORNER_WIDTH(*add_style)); ++ } + if (add_style->flags.has_icon_size_limits) + { + SSET_MIN_ICON_WIDTH( +@@ -2602,6 +2606,20 @@ + ps->change_mask.has_color_back = 1; + break; + } ++ else if (StrEquals(token, "CornerWidth")) ++ { ++ if (GetIntegerArguments(rest, &rest, val, 1)) ++ { ++ SSET_CORNER_WIDTH(*ps, (short)*val); ++ ps->flags.has_corner_width = 1; ++ } ++ else ++ { ++ ps->flags.has_corner_width = 0; ++ } ++ ps->flag_mask.has_corner_width = 1; ++ ps->change_mask.has_corner_width = 1; ++ } + else if (StrEquals(token, "CirculateSkipIcon")) + { + S_SET_DO_CIRCULATE_SKIP_ICON(SCF(*ps), on); +@@ -2912,6 +2930,15 @@ + S_SET_HAS_MWM_BORDER(SCM(*ps), 1); + S_SET_HAS_MWM_BORDER(SCC(*ps), 1); + } ++ else if (StrEquals(token, "FluxboxHandles")) ++ { ++ S_SET_HAS_FLUXBOX_HANDLES(SCF(*ps), on); ++ S_SET_HAS_FLUXBOX_HANDLES(SCM(*ps), 1); ++ S_SET_HAS_FLUXBOX_HANDLES(SCC(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), !on); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1); ++ } + else if (StrEquals(token, "FocusFollowsMouse")) + { + style_set_old_focus_policy(ps, 1); +@@ -4117,6 +4144,50 @@ + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCM(*ps), 1); + S_SET_IS_RIGHT_TITLE_ROTATED_CW(SCC(*ps), 1); + } ++ else if (StrEquals(token, "RoundedCorners")) ++ { ++ S_SET_HAS_ROUNDED_CORNERS_TOP(SCF(*ps), on); ++ S_SET_HAS_ROUNDED_CORNERS_TOP(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_TOP(SCC(*ps), 1); ++ ++ /* FluxboxHandles found */ ++ if (S_HAS_FLUXBOX_HANDLES(SCC(*ps))) { ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), !on); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1); ++ } ++ else { ++ S_SET_HAS_FLUXBOX_HANDLES(SCF(*ps), !on); ++ S_SET_HAS_FLUXBOX_HANDLES(SCM(*ps), 1); ++ S_SET_HAS_FLUXBOX_HANDLES(SCC(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), on); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1); ++ } ++ } ++ else if (StrEquals(token, "RoundedCornersTop")) ++ { ++ S_SET_HAS_ROUNDED_CORNERS_TOP(SCF(*ps), on); ++ S_SET_HAS_ROUNDED_CORNERS_TOP(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_TOP(SCC(*ps), 1); ++ } ++ else if (StrEquals(token, "RoundedCornersBottom")) ++ { ++ /* FluxboxHandles found */ ++ if (S_HAS_FLUXBOX_HANDLES(SCC(*ps))) { ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), !on); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1); ++ } ++ else { ++ S_SET_HAS_FLUXBOX_HANDLES(SCF(*ps), !on); ++ S_SET_HAS_FLUXBOX_HANDLES(SCM(*ps), 1); ++ S_SET_HAS_FLUXBOX_HANDLES(SCC(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCF(*ps), on); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCM(*ps), 1); ++ S_SET_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ps), 1); ++ } ++ } + else + { + found = False; +@@ -4251,6 +4322,12 @@ + S_SET_HAS_NO_STICKY_STIPPLED_ICON_TITLE(SCM(*ps), 1); + S_SET_HAS_NO_STICKY_STIPPLED_ICON_TITLE(SCC(*ps), 1); + } ++ else if (StrEquals(token, "SlightlyRoundedCorners")) ++ { ++ S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(SCF(*ps), on); ++ S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(SCM(*ps), 1); ++ S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(SCC(*ps), 1); ++ } + else if (StrEquals(token, "Slippery")) + { + S_SET_IS_STICKY_ACROSS_PAGES(SCF(*ps), !on); +@@ -5264,6 +5341,20 @@ + { + flags->do_update_rotated_title = 1; + } ++ ++ /* has_fluxbox_handles */ ++ if (S_HAS_FLUXBOX_HANDLES(SCC(*ret_style))) ++ { ++ flags->do_redecorate = True; ++ } ++ ++ /* has_rounded_corners */ ++ if (S_HAS_ROUNDED_CORNERS_TOP(SCC(*ret_style)) ++ || S_HAS_ROUNDED_CORNERS_BOTTOM(SCC(*ret_style)) ++ || S_HAS_SLIGHTLY_ROUNDED_CORNERS(SCC(*ret_style))) ++ { ++ flags->do_redecorate = True; ++ } + + if (S_HAS_BORDER_UNDER_TITLE(SCC(*ret_style))) + { +@@ -5528,6 +5619,12 @@ + flags->do_update_modules_flags = 1; + } + ++ /* has_corner_width */ ++ if (ret_style->change_mask.has_corner_width) ++ { ++ flags->do_redecorate = True; ++ } ++ + if (ret_style->change_mask.do_save_under || + ret_style->change_mask.use_backing_store || + ret_style->change_mask.use_parent_relative) +diff -U3 -r fvwm/style.h fvwm/style.h +--- fvwm/style.h 2011-12-09 19:40:50.148448924 +0100 ++++ fvwm/style.h 2011-12-09 19:51:38.708521953 +0100 +@@ -24,6 +24,8 @@ + ((sf)->has_color_fore) + #define SHAS_HANDLE_WIDTH(sf) \ + ((sf)->has_handle_width) ++#define SHAS_CORNER_WIDTH(sf) \ ++ ((sf)->has_corner_width) + #define SHAS_ICON(sf) \ + ((sf)->has_icon) + #define SHAS_ICON_BOXES(sf) \ +@@ -384,6 +386,22 @@ + ((c).s.has_border_under_title) + #define S_SET_HAS_BORDER_UNDER_TITLE(c,x) \ + ((c).s.has_border_under_title = !!(x)) ++#define S_HAS_FLUXBOX_HANDLES(c) \ ++ ((c).s.has_fluxbox_handles) ++#define S_SET_HAS_FLUXBOX_HANDLES(c,x) \ ++ ((c).s.has_fluxbox_handles = !!(x)) ++#define S_HAS_ROUNDED_CORNERS_TOP(c) \ ++ ((c).s.has_rounded_corners_top) ++#define S_SET_HAS_ROUNDED_CORNERS_TOP(c,x) \ ++ ((c).s.has_rounded_corners_top = !!(x)) ++#define S_HAS_ROUNDED_CORNERS_BOTTOM(c) \ ++ ((c).s.has_rounded_corners_bottom) ++#define S_SET_HAS_ROUNDED_CORNERS_BOTTOM(c,x) \ ++ ((c).s.has_rounded_corners_bottom = !!(x)) ++#define S_HAS_SLIGHTLY_ROUNDED_CORNERS(c) \ ++ ((c).s.has_slightly_rounded_corners) ++#define S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(c,x) \ ++ ((c).s.has_slightly_rounded_corners = !!(x)) + #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \ + ((c).s.do_ewmh_mini_icon_override) + #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \ +@@ -606,6 +624,10 @@ + ((s).handle_width) + #define SSET_HANDLE_WIDTH(s,x) \ + ((s).handle_width = (x)) ++#define SGET_CORNER_WIDTH(s) \ ++ ((s).corner_width) ++#define SSET_CORNER_WIDTH(s,x) \ ++ ((s).corner_width = (x)) + #define SGET_LAYER(s) \ + ((s).layer) + #define SSET_LAYER(s,x) \ +diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h +--- fvwm/window_flags.h 2011-12-09 19:40:50.151782172 +0100 ++++ fvwm/window_flags.h 2011-12-09 19:51:38.708521953 +0100 +@@ -316,12 +316,12 @@ + (fw)->flags.common.s.is_bottom_title_rotated = !!(x) + #define SETM_IS_BOTTOM_TITLE_ROTATED(fw,x) \ + (fw)->flag_mask.common.s.is_bottom_title_rotated = !!(x) +-#define IS_BOTTOM_TITLE_ROTATED(fw) \ +- ((fw)->flags.common.s.is_bottom_title_rotated) +-#define SET_IS_BOTTOM_TITLE_ROTATED(fw,x) \ +- (fw)->flags.common.s.is_bottom_title_rotated = !!(x) +-#define SETM_IS_BOTTOM_TITLE_ROTATED(fw,x) \ +- (fw)->flag_mask.common.s.is_bottom_title_rotated = !!(x) ++#define IS_TOP_TITLE_ROTATED(fw) \ ++ ((fw)->flags.common.s.is_top_title_rotated) ++#define SET_IS_TOP_TITLE_ROTATED(fw,x) \ ++ (fw)->flags.common.s.is_top_title_rotated = !!(x) ++#define SETM_IS_TOP_TITLE_ROTATED(fw,x) \ ++ (fw)->flag_mask.common.s.is_top_title_rotated = !!(x) + #define USE_TITLE_DECOR_ROTATION(fw) \ + ((fw)->flags.common.s.use_title_decor_rotation) + #define SET_USE_TITLE_DECOR_ROTATION(fw,x) \ +@@ -334,6 +334,30 @@ + (fw)->flags.common.s.has_border_under_title = !!(x) + #define SETM_HAS_BORDER_UNDER_TITLE(fw,x) \ + (fw)->flag_mask.common.s.has_border_under_title = !!(x) ++#define HAS_FLUXBOX_HANDLES(fw) \ ++ ((fw)->flags.common.s.has_fluxbox_handles && (fw->flags.has_handles)) ++#define SET_HAS_FLUXBOX_HANDLES(fw,x) \ ++ (fw)->flags.common.s.has_fluxbox_handles = !!(x) ++#define SETM_HAS_FLUXBOX_HANDLES(fw,x) \ ++ (fw)->flag_mask.common.s.has_fluxbox_handles = !!(x) ++#define HAS_ROUNDED_CORNERS_TOP(fw) \ ++ ((fw)->flags.common.s.has_rounded_corners_top) ++#define SET_HAS_ROUNDED_CORNERS_TOP(fw,x) \ ++ (fw)->flags.common.s.has_rounded_corners_top = !!(x) ++#define SETM_HAS_ROUNDED_CORNERS_TOP(fw,x) \ ++ (fw)->flag_mask.common.s.has_rounded_corners_top = !!(x) ++#define HAS_ROUNDED_CORNERS_BOTTOM(fw) \ ++ ((fw)->flags.common.s.has_rounded_corners_bottom) ++#define SET_HAS_ROUNDED_CORNERS_BOTTOM(fw,x) \ ++ (fw)->flags.common.s.has_rounded_corners_bottom = !!(x) ++#define SETM_HAS_ROUNDED_CORNERS_BOTTOM(fw,x) \ ++ (fw)->flag_mask.common.s.has_rounded_corners_bottom = !!(x) ++#define HAS_SLIGHTLY_ROUNDED_CORNERS(fw) \ ++ ((fw)->flags.common.s.has_slightly_rounded_corners) ++#define SET_HAS_SLIGHTLY_ROUNDED_CORNERS_BOTTOM(fw,x) \ ++ (fw)->flags.common.s.has_slightly_rounded_corners = !!(x) ++#define SETM_HAS_SLIGHTLY_ROUNDED_CORNERS(fw,x) \ ++ (fw)->flag_mask.common.s.has_slightly_rounded_corners = !!(x) + + /* access to the special flags of a window */ + #define DO_REUSE_DESTROYED(fw) \ +diff -U3 -r fvwm/windowshade.c fvwm/windowshade.c +--- fvwm/windowshade.c 2007-01-27 12:33:16.000000000 +0100 ++++ fvwm/windowshade.c 2011-12-09 19:51:38.711855201 +0100 +@@ -213,6 +213,7 @@ + border_draw_decorations( + fw, PART_TITLEBAR, (fw == get_focus_window()) ? True : False, + 0, CLEAR_BUTTONS, NULL, NULL); ++ frame_make_rounded_corners(fw); + /* update hints and inform modules */ + BroadcastConfig(M_CONFIGURE_WINDOW, fw); + BroadcastPacket( diff --git a/09-TopBorder.patch b/09-TopBorder.patch new file mode 100644 index 000000000000..e31159d0df8c --- /dev/null +++ b/09-TopBorder.patch @@ -0,0 +1,193 @@ +diff -U3 -r fvwm/builtins.c fvwm/builtins.c +--- fvwm/builtins.c 2011-08-07 00:03:31.000000000 +0200 ++++ fvwm/builtins.c 2011-12-09 20:53:09.537508019 +0100 +@@ -494,6 +494,21 @@ + if (action) + action += next; + } ++ else if (!do_add && StrEquals(parm,"buttonwidth")) ++ { ++ int width = 0; ++ int next = 0; ++ ++ sscanf(action, "%d%n", &width, &next); ++ ++ if (decor->button_width != width) ++ { ++ decor->button_width = width; ++ decor->flags.has_changed = 1; ++ } ++ if (action) ++ action += next; ++ } + else if (!do_add && StrEquals(parm,"MinHeight")) + { + int height = 0; +diff -U3 -r fvwm/frame.c fvwm/frame.c +--- fvwm/frame.c 2011-12-09 19:51:38.705188705 +0100 ++++ fvwm/frame.c 2011-12-09 20:53:09.537508019 +0100 +@@ -1369,7 +1369,14 @@ + tb_thick = fw->title_thickness; + nbuttons = fw->nr_left_buttons + fw->nr_right_buttons; + nbuttons_big = 0; +- b_length = tb_thick; ++ if (fw->decor->button_width == 0) ++ { ++ b_length = tb_thick; ++ } ++ else ++ { ++ b_length = fw->decor->button_width; ++ } + t_length = tb_length - nbuttons * b_length; + if (nbuttons > 0 && t_length < MIN_WINDOW_TITLE_LENGTH) + { +diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-12-09 19:51:38.705188705 +0100 ++++ fvwm/fvwm.h 2011-12-09 20:53:09.534174771 +0100 +@@ -277,6 +277,7 @@ + unsigned has_rounded_corners_top : 1; + unsigned has_rounded_corners_bottom : 1; + unsigned has_slightly_rounded_corners : 1; ++ unsigned has_no_top_border : 1; + focus_policy_t focus_policy; + } s; + } common_flags_t; +diff -U3 -r fvwm/geometry.c fvwm/geometry.c +--- fvwm/geometry.c 2011-12-09 19:51:38.705188705 +0100 ++++ fvwm/geometry.c 2011-12-09 20:53:09.534174771 +0100 +@@ -480,6 +480,7 @@ + const FvwmWindow *fw, size_borders *borders, Bool is_shaded) + { + int title_thickness; ++ int *title_border = NULL; + int bw; + + bw = HAS_FLUXBOX_HANDLES(fw) ? 1 : fw->boundary_width; +@@ -497,18 +498,25 @@ + switch (GET_TITLE_DIR(fw)) + { + case DIR_N: +- borders->top_left.height += title_thickness; ++ title_border = &borders->top_left.height; + break; + case DIR_S: +- borders->bottom_right.height += title_thickness; ++ title_border = &borders->bottom_right.height; + break; + case DIR_W: +- borders->top_left.width += title_thickness; ++ title_border = &borders->top_left.width; + break; + case DIR_E: +- borders->bottom_right.width += title_thickness; ++ title_border = &borders->bottom_right.width; + break; + } ++ ++ if (HAS_NO_TOP_BORDER(fw)) ++ { ++ *title_border = 1; ++ } ++ *title_border += title_thickness; ++ + borders->total_size.width = + borders->top_left.width + borders->bottom_right.width; + borders->total_size.height = +@@ -529,6 +537,26 @@ + borders->bottom_right.width = bw; + borders->top_left.height = bw; + borders->bottom_right.height = fw->boundary_width; ++ ++ if (HAS_NO_TOP_BORDER(fw)) ++ { ++ switch (GET_TITLE_DIR(fw)) ++ { ++ case DIR_N: ++ borders->top_left.height = 1; ++ break; ++ case DIR_S: ++ borders->bottom_right.height = 1; ++ break; ++ case DIR_W: ++ borders->top_left.width = 1; ++ break; ++ case DIR_E: ++ borders->bottom_right.width = 1; ++ break; ++ } ++ } ++ + borders->total_size.width = + borders->top_left.width + borders->bottom_right.width; + borders->total_size.height = +diff -U3 -r fvwm/screen.h fvwm/screen.h +--- fvwm/screen.h 2011-12-09 19:51:38.675189480 +0100 ++++ fvwm/screen.h 2011-12-09 20:53:09.537508019 +0100 +@@ -286,6 +286,7 @@ + #endif + int title_height; /* explicitly specified title bar height */ + int min_title_height; ++ int button_width; + /* titlebar buttons */ + TitleButton buttons[NUMBER_OF_TITLE_BUTTONS]; + TitleButton titlebar; +diff -U3 -r fvwm/style.c fvwm/style.c +--- fvwm/style.c 2011-12-09 19:51:38.708521953 +0100 ++++ fvwm/style.c 2011-12-09 20:53:09.534174771 +0100 +@@ -4734,6 +4734,12 @@ + ps->change_mask.has_title_format_string = 1; + + } ++ else if (StrEquals(token, "TopBorder")) ++ { ++ S_SET_HAS_NO_TOP_BORDER(SCF(*ps), !on); ++ S_SET_HAS_NO_TOP_BORDER(SCM(*ps), 1); ++ S_SET_HAS_NO_TOP_BORDER(SCC(*ps), 1); ++ } + else if (StrEquals(token, "TopTitleRotated")) + { + S_SET_IS_TOP_TITLE_ROTATED(SCF(*ps), on); +@@ -5360,6 +5366,11 @@ + { + flags->do_redecorate = True; + } ++ ++ if (S_HAS_NO_TOP_BORDER(SCC(*ret_style))) ++ { ++ flags->do_redecorate = True; ++ } + + /* has_mwm_border + * has_mwm_buttons */ +diff -U3 -r fvwm/style.h fvwm/style.h +--- fvwm/style.h 2011-12-09 19:51:38.708521953 +0100 ++++ fvwm/style.h 2011-12-09 20:53:09.534174771 +0100 +@@ -402,6 +402,11 @@ + ((c).s.has_slightly_rounded_corners) + #define S_SET_HAS_SLIGHTLY_ROUNDED_CORNERS(c,x) \ + ((c).s.has_slightly_rounded_corners = !!(x)) ++#define S_HAS_NO_TOP_BORDER(c) \ ++ ((c).s.has_no_top_border) ++#define S_SET_HAS_NO_TOP_BORDER(c,x) \ ++ ((c).s.has_no_top_border = !!(x)) ++ + #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \ + ((c).s.do_ewmh_mini_icon_override) + #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \ +diff -U3 -r fvwm/window_flags.h fvwm/window_flags.h +--- fvwm/window_flags.h 2011-12-09 19:51:38.708521953 +0100 ++++ fvwm/window_flags.h 2011-12-09 20:53:09.534174771 +0100 +@@ -358,6 +358,12 @@ + (fw)->flags.common.s.has_slightly_rounded_corners = !!(x) + #define SETM_HAS_SLIGHTLY_ROUNDED_CORNERS(fw,x) \ + (fw)->flag_mask.common.s.has_slightly_rounded_corners = !!(x) ++#define HAS_NO_TOP_BORDER(fw) \ ++ ((fw)->flags.common.s.has_no_top_border) ++#define SET_HAS_NO_TOP_BORDER(fw,x) \ ++ (fw)->flags.common.s.has_no_top_border = !!(x) ++#define SETM_HAS_NO_TOP_BORDER(fw,x) \ ++ (fw)->flag_mask.common.s.has_no_top_border = !!(x) + + /* access to the special flags of a window */ + #define DO_REUSE_DESTROYED(fw) \ diff --git a/10-ButtonWidth.patch b/10-ButtonWidth.patch new file mode 100644 index 000000000000..be0ab210a28e --- /dev/null +++ b/10-ButtonWidth.patch @@ -0,0 +1,25 @@ +diff -U3 -r fvwm/builtins.c fvwm/builtins.c +--- fvwm/builtins.c 2011-12-09 20:53:09.537508019 +0100 ++++ fvwm/builtins.c 2011-12-09 21:00:47.315799724 +0100 +@@ -509,6 +509,21 @@ + if (action) + action += next; + } ++ else if (!do_add && StrEquals(parm,"buttonwidth")) ++ { ++ int width = 0; ++ int next = 0; ++ ++ sscanf(action, "%d%n", &width, &next); ++ ++ if (decor->button_width != width) ++ { ++ decor->button_width = width; ++ decor->flags.has_changed = 1; ++ } ++ if (action) ++ action += next; ++ } + else if (!do_add && StrEquals(parm,"MinHeight")) + { + int height = 0; diff --git a/11-MultiBorder.patch b/11-MultiBorder.patch new file mode 100644 index 000000000000..b7a11087e6ff --- /dev/null +++ b/11-MultiBorder.patch @@ -0,0 +1,542 @@ +diff -U3 -r fvwm/borders.c fvwm/borders.c +--- fvwm/borders.c 2011-12-09 20:59:40.674170242 +0100 ++++ fvwm/borders.c 2011-12-09 21:31:27.171864221 +0100 +@@ -1647,6 +1647,7 @@ + True : False; + xgcv.fill_style = FillSolid; + valuemask = GCFillStyle; ++ + if (!bg->flags.use_pixmap) + { + /* solid pixel */ +@@ -1839,13 +1840,26 @@ + + static void border_get_border_background( + pixmap_background_type *bg, common_decorations_type *cd, +- rectangle *part_g, rectangle *relative_g, int *free_bg_pixmap, Window w, window_parts part) ++ rectangle *part_g, rectangle *relative_g, int *free_bg_pixmap, Window w, window_parts part, FvwmPicture *fp) + { + *free_bg_pixmap = False; + +- if (cd->texture_pixmap) ++ if (fp) + { + bg->flags.use_pixmap = 1; ++ bg->pixmap.p = fp->picture; ++ bg->pixmap.g.width = fp->width; ++ bg->pixmap.g.height = fp->height; ++ bg->pixmap.shape = None; ++ bg->pixmap.alpha = None; ++ bg->pixmap.depth = fp->depth; ++ bg->pixmap.flags.is_tiled = 1; ++ bg->pixmap.flags.is_stretched = 0; ++ bg->pixmap.fra.mask = 0; ++ } ++ else if (cd->texture_pixmap) ++ { ++ bg->flags.use_pixmap = 1; + bg->pixmap.p = cd->texture_pixmap; + bg->pixmap.g.width = cd->texture_pixmap_width; + bg->pixmap.g.height = cd->texture_pixmap_height; +@@ -1940,6 +1954,18 @@ + return; + } + ++#define DRAWBORDER(PIX,X,Y,WIDTH,HEIGHT) \ ++ { \ ++ fp = df->u.mb.pixmaps[PIX]; \ ++ border_get_border_background( \ ++ &bg, cd, &part_g, &relative_g, &free_bg_pixmap, w, PART_NONE, fp); \ ++ r.x = X; \ ++ r.y = Y; \ ++ r.width = WIDTH; \ ++ r.height = HEIGHT; \ ++ border_fill_pixmap_background(p, &r, &bg, cd); \ ++ } ++ + static void border_draw_one_border_part( + common_decorations_type *cd, FvwmWindow *fw, rectangle *sidebar_g, + rectangle *frame_g, border_relief_descr *br, window_parts part, +@@ -1952,6 +1978,7 @@ + Pixmap p; + Window w; + Bool free_bg_pixmap = False; ++ int x, y, width, height; + + /* make a pixmap */ + border_get_part_geometry(fw, part, sidebar_g, &part_g, &w); +@@ -1965,8 +1992,28 @@ + relative_g.height = fw->g.frame.height; + relative_g.x = part_g.x; + relative_g.y = part_g.y; +- border_get_border_background( +- &bg, cd, &part_g, &relative_g, &free_bg_pixmap, w, part); ++ ++ DecorFace* df; ++ FvwmPicture* fp = 0; ++ df = border_get_border_style(fw, (Scr.Hilite == fw)); ++ if (DFS_FACE_TYPE(df->style) == MultiBorder) ++ { ++ int id = -1; ++ if (part==PART_BORDER_NW) id = 0; ++ if (part==PART_BORDER_N) id = 1; ++ if (part==PART_BORDER_NE) id = 2; ++ if (part==PART_BORDER_E) id = 3; ++ if (part==PART_BORDER_SE) id = 4; ++ if (part==PART_BORDER_S) id = 5; ++ if (part==PART_BORDER_SW) id = 6; ++ if (part==PART_BORDER_W) id = 7; ++ ++ if (id>=0 && df->u.mb.pixmaps[id]) ++ { ++ fp = df->u.mb.pixmaps[id]; ++ } ++ } ++ + if (cd->texture_pixmap) + { + switch (part) +@@ -2009,13 +2056,100 @@ + bg.pixmap.g.x = 0; + bg.pixmap.g.y = 0; + } +- /* set the geometry for drawing the Tiled pixmap; maybe add the relief +- * as offset? */ +- pix_g.x = 0; +- pix_g.y = 0; +- pix_g.width = part_g.width; +- pix_g.height = part_g.height; +- border_fill_pixmap_background(p, &pix_g, &bg, cd); ++ ++ border_get_border_background( ++ &bg, cd, &part_g, &relative_g, &free_bg_pixmap, w, PART_NONE, fp); ++ ++ int px = bg.pixmap.g.x; ++ int py = bg.pixmap.g.y; ++ ++ if (fp) ++ { ++ /* Position pixmap so that it's aligned to the edge of the window */ ++ if (part & PART_BOTTOM) ++ { ++ bg.pixmap.g.y = fp->height - sidebar_g->y; ++ if (part == PART_BORDER_S) ++ { ++ bg.pixmap.g.y = fp->height - fw->boundary_width; ++ } ++ } ++ if (part & PART_RIGHT) ++ { ++ bg.pixmap.g.x = fp->width - sidebar_g->x; ++ if (part == PART_BORDER_E) ++ { ++ bg.pixmap.g.x = fp->width - fw->boundary_width; ++ } ++ } ++ } ++ ++ /* set the geometry for drawing the Tiled pixmap; maybe add the relief ++ * as offset? */ ++ pix_g.x = 0; ++ pix_g.y = 0; ++ pix_g.width = part_g.width; ++ pix_g.height = part_g.height; ++ ++ border_fill_pixmap_background(p, &pix_g, &bg, cd); ++ ++ bg.pixmap.g.x = px; ++ bg.pixmap.g.y = py; ++ ++ if (fp) ++ { ++ height = pix_g.height; ++ width = pix_g.width; ++ x = pix_g.x; ++ y = pix_g.y; ++ ++ /* draw parts from other borders that overflow because of their width/height */ ++ rectangle r; ++ if (part==PART_BORDER_S) ++ { ++ DRAWBORDER(6, pix_g.x - sidebar_g->x, fw->boundary_width - fp->height, fp->width - sidebar_g->x, height); ++ DRAWBORDER(4, pix_g.width - fp->width + sidebar_g->x, fw->boundary_width - fp->height, fp->width - sidebar_g->x, height); ++ } ++ if (!IS_SHADED(fw)) ++ { ++ if (part==PART_BORDER_E) ++ { ++ DRAWBORDER(2, fw->boundary_width - fp->width, pix_g.y - sidebar_g->y, width, fp->height - sidebar_g->y); ++ DRAWBORDER(4, fw->boundary_width - fp->width, pix_g.height - fp->height + sidebar_g->y, width, fp->height - sidebar_g->y); ++ } ++ if (part==PART_BORDER_W) ++ { ++ DRAWBORDER(0, x, pix_g.y - sidebar_g->y, width, fp->height - sidebar_g->y); ++ DRAWBORDER(6, x, pix_g.height - fp->height + sidebar_g->y, width, fp->height - sidebar_g->y); ++ } ++ } ++ if (part==PART_BORDER_N) ++ { ++ DRAWBORDER(2, pix_g.width - fp->width + sidebar_g->x, y, fp->width - sidebar_g->x, height); ++ DRAWBORDER(0, pix_g.x - fp->width + sidebar_g->x, y, fp->width - sidebar_g->x, height); ++ } ++ /* Use the top border for the whole height of the titlebar, overflowing to parts of the bottom corners if shaded */ ++ if (IS_SHADED(fw)) ++ { ++ if (part==PART_BORDER_W) ++ { ++ DRAWBORDER(0, 0, -height, width, height); ++ } ++ if (part==PART_BORDER_SW) ++ { ++ DRAWBORDER(0, 0, -height*2, width, height - fw->boundary_width); ++ } ++ if (part==PART_BORDER_E) ++ { ++ DRAWBORDER(2, fw->boundary_width - fp->width, -height, width, height); ++ } ++ if (part==PART_BORDER_SE) ++ { ++ DRAWBORDER(2, width - fp->width, -height*2, width, height - fw->boundary_width); ++ } ++ } ++ } ++ + if (HAS_FLUXBOX_HANDLES(fw) && (part & PART_BOTTOM)) + { + pix_g.y = part_g.height - fw->boundary_width; +@@ -2032,6 +2166,7 @@ + border_fill_fluxbox_handle(p, &pix_g, cd, !(part & PART_BORDER_S)); + } + } ++ + if (free_bg_pixmap && bg.pixmap.p) + { + XFreePixmap(dpy, bg.pixmap.p); +@@ -2086,7 +2221,7 @@ + do_clear); + } + } +- ++ + return; + } + +@@ -3711,7 +3846,7 @@ + relative_g.x = button_g->x; + relative_g.y = button_g->y; + border_get_border_background( +- &bg, td->cd, button_g, &relative_g, &free_bg_pixmap, w, PART_NONE); ++ &bg, td->cd, button_g, &relative_g, &free_bg_pixmap, w, PART_NONE, (FvwmPicture *)NULL); + bg.pixmap.g.x = 0; + bg.pixmap.g.y = 0; + /* set the geometry for drawing the Tiled pixmap; +@@ -4158,7 +4293,7 @@ + relative_g.y = td->layout.title_g.y; + border_get_border_background( + &bg, td->cd, &td->layout.title_g, &relative_g, +- &free_bg_pixmap, w, PART_NONE); ++ &free_bg_pixmap, w, PART_NONE, (FvwmPicture *)NULL); + bg.pixmap.g.x = 0; + bg.pixmap.g.y = 0; + /* set the geometry for drawing the Tiled pixmap; +diff -U3 -r fvwm/builtins.c fvwm/builtins.c +--- fvwm/builtins.c 2011-12-09 21:00:47.315799724 +0100 ++++ fvwm/builtins.c 2011-12-09 21:31:27.171864221 +0100 +@@ -794,6 +794,50 @@ + return s; + } + ++static char *ReadMultiBorderDecor(char *s, DecorFace *df) ++{ ++ FvwmPictureAttributes fpa; ++ FvwmPicture **pm; ++ char *token; ++ int x; ++ int y; ++ ++ pm = df->u.mb.pixmaps; ++ df->style.face_type = MultiBorder; ++ ++ for (x = 0; x < 8; x++) ++ { ++ s = DoPeekToken(s, &token, " ", NULL, NULL); ++ if (s == NULL) ++ { ++ break; ++ } ++ if (pm[x]) ++ { ++ PDestroyFvwmPicture(dpy, pm[x]); ++ } ++ pm[x] = PCacheFvwmPicture(dpy, Scr.NoFocusWin, NULL, ++ token, fpa); ++ ++ if (!pm[x]) ++ { ++ fvwm_msg(ERR, "ReadMultiBorderDecor", ++ "Pixmap '%s' could not be loaded", ++ token); ++ for(y = 0; y < x; y++) ++ { ++ if (pm[y]) ++ { ++ PDestroyFvwmPicture(dpy, pm[y]); ++ } ++ } ++ return NULL; ++ } ++ } ++ ++ return s; ++} ++ + /* + * + * DestroyFvwmDecor -- frees all memory assocated with an FvwmDecor +@@ -1501,6 +1545,14 @@ + free(df->u.mp.pixels); + } + break; ++ case MultiBorder: ++ for (i = 0; i < 8; i++) ++ { ++ if (df->u.mb.pixmaps[i]) ++ { ++ PDestroyFvwmPicture(dpy, df->u.mb.pixmaps[i]); ++ } ++ } + case VectorButton: + case DefaultVectorButton: + if (df->u.vector.x) +@@ -1870,6 +1922,15 @@ + return False; + } + } ++ else if (strncasecmp(style,"MultiBorder",11)==0) ++ { ++ s = ReadMultiBorderDecor(s, df); ++ if (!s) ++ { ++ return False; ++ } ++ DFS_FACE_TYPE(df->style) = MultiBorder; ++ } + else if (FMiniIconsSupported && + strncasecmp (style, "MiniIcon", 8) == 0) + { +diff -U3 -r fvwm/menus.c fvwm/menus.c +--- fvwm/menus.c 2011-12-09 20:59:40.677503490 +0100 ++++ fvwm/menus.c 2011-12-09 21:31:27.175197468 +0100 +@@ -2636,6 +2636,41 @@ + return do_clear; + } + ++#define DRAWMENUBORDER(NUM, XX, YY) XCopyArea(\ ++ dpy, pm[(NUM)]->picture, MR_WINDOW(mr), Scr.TransMaskGC,\ ++ 0, 0, pm[(NUM)]->width, pm[(NUM)]->height, (XX), (YY)) ++static Bool paint_menu_multipixmap_background( ++ MenuRoot *mr, XEvent *pevent) ++{ ++ MenuStyle *ms = MR_STYLE(mr); ++ int width, height, x, y; ++ int bw = MST_BORDER_WIDTH(mr); ++ FvwmPicture **pm; ++ pm = ST_FACE(ms).u.mb.pixmaps; ++ ++ width = MR_WIDTH(mr); ++ height = MR_HEIGHT(mr); ++ ++ FvwmPicture *p = pm[0]; ++ ++ width = MR_WIDTH(mr); ++ height = MR_HEIGHT(mr); ++ ++ x = 0; ++ ++ for (x = 0; x < width; x+=pm[1]->width) DRAWMENUBORDER(1, x, 0); ++ for (x = 0; x < width; x+=pm[5]->width) DRAWMENUBORDER(5, x, height-pm[5]->height); ++ for (x = 0; x < height; x+=pm[3]->height) DRAWMENUBORDER(3, width-pm[3]->height, x); ++ for (x = 0; x < height; x+=pm[7]->height) DRAWMENUBORDER(7, 0, x); ++ ++ DRAWMENUBORDER(0, 0, 0); ++ DRAWMENUBORDER(2, width-pm[2]->width, 0); ++ DRAWMENUBORDER(4, width-pm[4]->width, height-pm[4]->height); ++ DRAWMENUBORDER(6, 0, height-pm[6]->height); ++ ++ return False; ++} ++ + static Bool paint_menu_pixmap_background( + MenuRoot *mr, XEvent *pevent) + { +@@ -2738,15 +2773,20 @@ + { + /* Only the border was obscured. Redraw it centrally instead of + * redrawing several menu items. */ +- RelieveRectangle( +- dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1, +- MR_HEIGHT(mr) - 1, (Pdepth < 2) ? +- SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) : +- HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)), +- SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw); ++ if (ms && ST_FACE(ms).type == MultiPixmapMenu) + { +- return; ++ paint_menu_multipixmap_background(mr, pevent); + } ++ else ++ { ++ RelieveRectangle( ++ dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1, ++ MR_HEIGHT(mr) - 1, (Pdepth < 2) ? ++ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) : ++ HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)), ++ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw); ++ } ++ return; + } + MR_IS_PAINTED(mr) = 1; + /* paint the menu background */ +@@ -2811,6 +2851,9 @@ + case PixmapMenu: + do_clear = paint_menu_pixmap_background(mr, pevent); + break; ++ case MultiPixmapMenu: ++ do_clear = paint_menu_multipixmap_background(mr, pevent); ++ break; + case TiledPixmapMenu: + XSetWindowBackgroundPixmap( + dpy, MR_WINDOW(mr), ST_FACE(ms).u.p->picture); +@@ -2823,11 +2866,14 @@ + } + } /* if (ms) */ + /* draw the relief */ +- RelieveRectangle(dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1, +- MR_HEIGHT(mr) - 1, (Pdepth < 2) ? +- SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) : +- HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)), +- SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw); ++ if (!(ms && ST_FACE(ms).type == MultiPixmapMenu)) ++ { ++ RelieveRectangle(dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1, ++ MR_HEIGHT(mr) - 1, (Pdepth < 2) ? ++ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) : ++ HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)), ++ SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), bw); ++ } + /* paint the menu items */ + for (mi = MR_FIRST_ITEM(mr); mi != NULL; mi = MI_NEXT_ITEM(mi)) + { +diff -U3 -r fvwm/menustyle.c fvwm/menustyle.c +--- fvwm/menustyle.c 2011-12-09 20:59:40.677503490 +0100 ++++ fvwm/menustyle.c 2011-12-09 21:31:27.175197468 +0100 +@@ -160,6 +160,8 @@ + char *token; + char *action = s; + FvwmPictureAttributes fpa; ++ FvwmPicture **pm; ++ int x, y; + + s = GetNextToken(s, &style); + if (style && strncasecmp(style, "--", 2) == 0) +@@ -271,6 +273,58 @@ + return False; + } + } ++ else if (StrEquals(style,"MultiBorder")) ++ { ++ fpa.mask = (Pdepth <= 8)? FPAM_DITHER:0; ++ pm = mf->u.mb.pixmaps; ++ ++ for (x = 0; x < 8; x++) ++ { ++ if (pm[x]) ++ { ++ PDestroyFvwmPicture(dpy, pm[x]); ++ } ++ s = GetNextToken(s, &token); ++ if (token) ++ { ++ pm[x] = PCacheFvwmPicture(dpy, Scr.NoFocusWin, NULL, token, fpa); ++ if (!pm[x]) ++ { ++ fvwm_msg(ERR, ++ "menustyle_parse_face", "Pixmap '%s' could not be loaded", ++ token); ++ } ++ } ++ else ++ { ++ fvwm_msg(ERR, ++ "menustyle_parse_face", "Too few parameters for MultiBorder"); ++ } ++ if (!token || !pm[x]) ++ { ++ for (y = 0; y < x; y++) ++ { ++ if (pm[y]) ++ { ++ PDestroyFvwmPicture(dpy, pm[y]); ++ pm[y] = 0; ++ } ++ } ++ free(style); ++ if (token) ++ { ++ free(token); ++ } ++ if (mf->type == MultiPixmapMenu) ++ { ++ mf->type = SimpleMenu; ++ } ++ return False; ++ } ++ mf->type = MultiPixmapMenu; ++ free(token); ++ } ++ } + else + { + if (verbose) +diff -U3 -r fvwm/menustyle.h fvwm/menustyle.h +--- fvwm/menustyle.h 2011-12-09 20:59:40.677503490 +0100 ++++ fvwm/menustyle.h 2011-12-09 21:31:27.175197468 +0100 +@@ -195,6 +195,7 @@ + GradientMenu, + PixmapMenu, + TiledPixmapMenu, ++ MultiPixmapMenu, + SolidMenu + /* max button is 8 (0x8) */ + } MenuFaceType; +@@ -245,6 +246,9 @@ + { + union + { ++ struct { ++ FvwmPicture *pixmaps[8]; ++ } mb; + FvwmPicture *p; + Pixel back; + struct +diff -U3 -r fvwm/screen.h fvwm/screen.h +--- fvwm/screen.h 2011-12-09 21:12:03.205196181 +0100 ++++ fvwm/screen.h 2011-12-09 21:31:27.175197468 +0100 +@@ -99,6 +99,7 @@ + AdjustedPixmapButton, + ShrunkPixmapButton, + MultiPixmap, ++ MultiBorder, + MiniIconButton, + SolidButton, + ColorsetButton +@@ -158,6 +159,9 @@ + Pixel *pixels; + unsigned short solid_flags; + } mp; ++ struct { ++ FvwmPicture *pixmaps[8]; ++ } mb; + struct + { + int cs; diff --git a/12-FvwmButtonsTips.patch b/12-FvwmButtonsTips.patch new file mode 100644 index 000000000000..7c6516ff6182 --- /dev/null +++ b/12-FvwmButtonsTips.patch @@ -0,0 +1,318 @@ +diff -U3 -r libs/FTips.c libs/FTips.c +--- libs/FTips.c 2007-01-27 12:33:16.000000000 +0100 ++++ libs/FTips.c 2011-12-09 21:42:01.022148670 +0100 +@@ -505,7 +505,7 @@ + if (fc == NULL) + { + fc = default_config; +- } ++ } + current_config = fc; + + if (label != NULL) +diff -U3 -r modules/FvwmButtons/FvwmButtons.c modules/FvwmButtons/FvwmButtons.c +--- modules/FvwmButtons/FvwmButtons.c 2011-08-27 23:51:29.000000000 +0200 ++++ modules/FvwmButtons/FvwmButtons.c 2011-12-09 21:42:01.022148670 +0100 +@@ -62,6 +62,7 @@ + #include "libs/Colorset.h" + #include "libs/vpacket.h" + #include "libs/FRender.h" ++#include "libs/FTips.h" + #include "libs/fsm.h" + #include "libs/ColorUtils.h" + #include "libs/Graphics.h" +@@ -907,6 +908,7 @@ + button_info *tmp = ActiveButton; + ActiveButton = b; + RedrawButton(tmp, DRAW_FORCE, NULL); ++ + } + if ( + b->flags.b_ActiveIcon || +@@ -1061,6 +1063,9 @@ + + tmp.name = NULL; + tmp.name_list = NULL; ++ ++ FTipsInit(Dpy); ++ + while ( !isTerminated ) + { + if (My_FNextEvent(Dpy, &Event)) +@@ -1186,6 +1191,10 @@ + if (!event.xconfigure.send_event && + Event.xconfigure.window != MyWindow) + continue; ++ ++ if(FTipsHandleEvents(Dpy, &event)) ++ continue; ++ + Event.xconfigure.x = event.xconfigure.x; + Event.xconfigure.y = event.xconfigure.y; + Event.xconfigure.send_event = True; +@@ -1228,10 +1237,33 @@ + case EnterNotify: + b = handle_new_position( + b, Event.xcrossing.x, Event.xcrossing.y); ++ ++ if(Event.xcrossing.mode == NotifyNormal) ++ { ++ b = handle_new_position( ++ b, Event.xcrossing.x, Event.xcrossing.y); ++ FTipsOn(Dpy,MyWindow,UberButton->c->tips_config, ++ (void *)UberButton, b->tipslabel, ++ b->x, b->y, Width,Height); ++ FTipsUpdateLabel(Dpy, b->tipslabel); ++ } + break; + + case MotionNotify: ++ + b = handle_new_position(b, Event.xmotion.x, Event.xmotion.y); ++ ++ x = Event.xbutton.x; ++ y = Event.xbutton.y; ++ ++ if(b->tipslabel != NULL) ++ { ++ FTipsOn(Dpy,MyWindow,UberButton->c->tips_config, (void *)UberButton, b->tipslabel, x, y, w, h); ++ FTipsUpdateLabel(Dpy, b->tipslabel); ++ } else { ++ FTipsCancel(Dpy); ++ } ++ + break; + + case LeaveNotify: +@@ -1254,11 +1286,13 @@ + b = ActiveButton; + ActiveButton = NULL; + RedrawButton(b, DRAW_FORCE, NULL); ++ + } + if (CurrentButton) + { + RedrawButton(b, DRAW_FORCE, NULL); + } ++ FTipsCancel(Dpy); + } + break; + +@@ -1280,8 +1314,8 @@ + Window dummy; + + XTranslateCoordinates( +- Dpy, Event.xbutton.window, MyWindow, Event.xbutton.x, +- Event.xbutton.y, &x, &y, &dummy); ++ Dpy, Event.xbutton.window, MyWindow, Event.xbutton.x, ++ Event.xbutton.y, &x, &y, &dummy); + } + if (CurrentButton) + { +@@ -1323,7 +1357,10 @@ + RedrawButton(tmp, DRAW_FORCE, NULL); + } + else ++ { + RedrawButton(b, DRAW_FORCE, NULL); ++ } ++ + if (!act) + { + break; +diff -U3 -r modules/FvwmButtons/FvwmButtons.h modules/FvwmButtons/FvwmButtons.h +--- modules/FvwmButtons/FvwmButtons.h 2008-04-05 12:02:45.000000000 +0200 ++++ modules/FvwmButtons/FvwmButtons.h 2011-12-09 21:42:01.022148670 +0100 +@@ -38,6 +38,8 @@ + #include "libs/fvwmlib.h" + #include "libs/Picture.h" + #include "libs/Flocale.h" ++#include "libs/FTips.h" ++#define FONT_STRING "-*-fixed-medium-r-normal--13-*" + + /* ------------------------------- structs --------------------------------- */ + +@@ -82,6 +84,7 @@ + unsigned b_PressIcon : 1; /* Use alternate Icon on press */ + unsigned b_PressColorset : 1; /* Use alternate Colorset on press */ + unsigned b_PressTitle : 1; /* Use alternate Title text on press */ ++ unsigned b_UseTips : 1; /* Whether to use tips or not. */ + } flags_type; + + /* Flags for b->swallow */ +@@ -131,6 +134,9 @@ + int colorset; /* b_Colorset */ + int activeColorset; /* b_ActiveColorset */ + int pressColorset; /* b_PressColorset */ ++ char *tipsfont; /* b_TipsFont*/ ++ ftips_config *tips_config; /* Struct that holds tips info.*/ ++ + Pixel fc; /* b_Fore */ + Pixel bc, hc, sc; /* b_Back && !b_IconBack */ + FvwmPicture *backicon; /* b_Back && b_IconBack */ +@@ -187,6 +193,7 @@ + FvwmPicture *pressicon; /* b_PressIcon */ + int activeColorset; /* b_ActiveColorset */ + int pressColorset; /* b_PressColorset */ ++ char *tipslabel; /* b_TipsLabel */ + Window IconWin; /* b_Swallow */ + Window PanelWin; /* b_Panel */ + Window BackIconWin; /* b_Back && b_IconBack */ +diff -U3 -r modules/FvwmButtons/parse.c modules/FvwmButtons/parse.c +--- modules/FvwmButtons/parse.c 2008-04-05 12:02:45.000000000 +0200 ++++ modules/FvwmButtons/parse.c 2011-12-09 21:42:01.025481917 +0100 +@@ -889,6 +889,7 @@ + "presstitle", + "activecolorset", + "presscolorset", ++ "tipslabel", + "top", + NULL + }; +@@ -1612,7 +1613,33 @@ + b->flags.b_ActiveColorset = 0; + } + break; ++ /* --------- TipsLabel ---------*/ ++ case 28: ++ s = trimleft(s); ++ t = seekright(&s); ++ if(ub->c->flags.b_UseTips) ++ { ++ if (*s == '(') ++ { ++ fprintf(stderr, ++ "%s: justification not allowed " ++ "for TipsLabel.\n", MyName); ++ } ++ ++ ++ ++ if (t && *t && (t[0] != '-' || t[1] != 0)) ++ { ++ if (b->tipslabel != NULL) ++ { ++ free(b->tipslabel); ++ } else { ++ b->tipslabel = t; ++ } ++ } ++ } + ++ break; + /* --------------- --------------- */ + case 26: /* PressColorset */ + i = strtol(s, &t, 10); +@@ -1784,6 +1811,14 @@ + "colorset", + "activecolorset", + "presscolorset", ++ "usetips", ++ "tipsfont", ++ "tipsdelay", ++ "tipscolorset", ++ "tipsborderwidth", ++ "tipsplacement", ++ "tipsjustification", ++ "tipsoffset", + NULL + }; + int i, j, k; +@@ -1931,7 +1966,97 @@ + ub->c->flags.b_PressColorset = 0; + } + break; ++ case 15: /* UseTips */ ++ /* We're using tips.*/ ++ ub->c->flags.b_UseTips = 1; ++ ++ /* Set the defaults up. */ ++ ub->c->tips_config = FTipsNewConfig(); ++ ++ /* Include fonts. */ ++ CopyStringWithQuotes(&ub->c->tipsfont,FONT_STRING); ++ ub->c->tips_config->Ffont = FlocaleLoadFont(Dpy, ++ ub->c->tipsfont, MyName); ++ break; ++ case 16: /* TipsFont */ ++ if(ub->c->flags.b_UseTips) ++ { ++ CopyStringWithQuotes(&ub->c->tipsfont,s); + ++ ub->c->tips_config->Ffont = FlocaleLoadFont(Dpy, ub->c->tipsfont, ++ MyName); ++ } ++ ++ break; ++ case 17: /*TipsDelay */ ++ if(ub->c->flags.b_UseTips) ++ { ++ i = sscanf(s, "%d %d", &j, &k); ++ if( i > 0) ++ { ++ /* Then only one value was given. Set the ++ * mapped_delay option to this given value ++ * also since it's optional. ++ */ ++ ub->c->tips_config->delay = ub->c->tips_config->mapped_delay = j; ++ } ++ if( i > 1) ++ { ++ /* Two values passed in. We only need to ++ * change the value for mapped_delay here. ++ */ ++ ++ ub->c->tips_config->mapped_delay = k; ++ ++ } ++ } ++ break; ++ case 18: /* TipsColorset */ ++ if (ub->c->flags.b_UseTips) ++ { ++ i = sscanf(s, "%d", &j); ++ if (i > 0) ++ { ++ ub->c->tips_config->colorset = j; ++ AllocColorset(j); ++ } ++ } ++ break; ++ case 19: /* TipsBorderWidth */ ++ if (ub->c->flags.b_UseTips) ++ { ++ i = sscanf(s, "%d", &j); ++ ++ if(i > 0) ++ { ++ ub->c->tips_config->border_width = j; ++ } ++ } ++ break; ++ case 20: /* TipsPlacement */ ++ if(ub->c->flags.b_UseTips) ++ { ++ s = trimleft(s); ++ ++ /* Options ... */ ++ if(!strcasecmp(s, "up")) ++ { ++ i = FTIPS_PLACEMENT_UP; ++ } else if(!strcasecmp(s, "down")) { ++ i = FTIPS_PLACEMENT_DOWN; ++ } else if(!strcasecmp(s, "left")) { ++ i = FTIPS_PLACEMENT_LEFT; ++ } else if(!strcasecmp(s, "right")) { ++ i = FTIPS_PLACEMENT_RIGHT; ++ } else if(!strcasecmp(s, "updown")) { ++ i = FTIPS_PLACEMENT_AUTO_UPDOWN; ++ } else if(!strcasecmp(s, "leftright")) { ++ i = FTIPS_PLACEMENT_AUTO_LEFTRIGHT; ++ } ++ ++ ub->c->tips_config->placement = i; ++ } ++ break; + default: + s = trimleft(s); + ParseButton(ubb, s); diff --git a/13-FvwmIconMan.patch b/13-FvwmIconMan.patch new file mode 100644 index 000000000000..bfb606b5e013 --- /dev/null +++ b/13-FvwmIconMan.patch @@ -0,0 +1,114 @@ +Seulement dans modules/FvwmButtons: FvwmButtons.c.orig +Seulement dans modules/FvwmButtons: FvwmButtons.h.orig +Seulement dans modules/FvwmButtons: parse.c.orig +diff -U3 -r modules/FvwmIconMan/FvwmIconMan.h modules/FvwmIconMan/FvwmIconMan.h +--- modules/FvwmIconMan/FvwmIconMan.h 2010-08-07 00:35:19.000000000 +0200 ++++ modules/FvwmIconMan/FvwmIconMan.h 2011-12-09 21:47:16.017350293 +0100 +@@ -316,6 +316,8 @@ + char *tips_fontname; + char *tips_formatstring; + ftips_config *tips_conf; ++ Uchar roundedcorners; ++ int padding; + + /* X11 state */ + Window theWindow, theFrame; +diff -U3 -r modules/FvwmIconMan/readconfig.c modules/FvwmIconMan/readconfig.c +--- modules/FvwmIconMan/readconfig.c 2011-08-07 00:03:32.000000000 +0200 ++++ modules/FvwmIconMan/readconfig.c 2011-12-09 21:47:16.014017045 +0100 +@@ -2021,6 +2021,40 @@ + } + SET_MANAGER(manager, relief_thickness, n); + } ++ else if (!strcasecmp(option1, "padding")) { ++ p = read_next_cmd(READ_ARG); ++ if (!p) { ++ ConsoleMessage("Bad line: %s\n", current_line); ++ continue; ++ } ++ if (extract_int(p, &n) == 0) { ++ ConsoleMessage("This is not a number: %s\n", p); ++ ConsoleMessage("Bad line: %s\n", current_line); ++ continue; ++ } ++ SET_MANAGER(manager, padding, n); ++ } ++ else if (!strcasecmp(option1, "roundedcorners")) { ++ p = read_next_cmd(READ_ARG); ++ if (!p) { ++ ConsoleMessage("Bad line: %s\n", current_line); ++ ConsoleMessage("Need argument to roundedcorners\n"); ++ continue; ++ } ++ if (!strcasecmp(p, "true")) { ++ i = 1; ++ } ++ else if (!strcasecmp(p, "false")) { ++ i = 0; ++ } ++ else { ++ ConsoleMessage("Bad line: %s\n", current_line); ++ ConsoleMessage("What is this: %s?\n", p); ++ continue; ++ } ++ ConsoleDebug(CONFIG, "Setting roundedcorners to: %d\n", i); ++ SET_MANAGER(manager, roundedcorners, i); ++ } + else if (!strcasecmp(option1, "tips")) { + p = read_next_cmd(READ_ARG); + if (!p) { +diff -U3 -r modules/FvwmIconMan/xmanager.c modules/FvwmIconMan/xmanager.c +--- modules/FvwmIconMan/xmanager.c 2011-04-15 13:57:02.000000000 +0200 ++++ modules/FvwmIconMan/xmanager.c 2011-12-09 21:47:16.014017045 +0100 +@@ -1365,6 +1365,8 @@ + + g->text_y = g->button_y + text_pad; + g->text_base = g->text_y + man->FButtonFont->ascent; ++ ++ g->button_w -= man->padding; + } + + static void draw_button_background( +@@ -1637,6 +1639,33 @@ + } + } + ++static void __draw_rounded_corner(WinManager *man, ButtonGeometry *g, ++ int x, int y, int width, int height, GC gc) ++{ ++ int x1 = g->button_x + x; ++ int x2 = g->button_x + g->button_w - x - width; ++ int y1 = g->button_y + y; ++ int y2 = g->button_y + g->button_h - y - height; ++ ++ XFillRectangle(theDisplay, man->theWindow, gc, x1, y1, width, height); ++ XFillRectangle(theDisplay, man->theWindow, gc, x2, y1, width, height); ++ XFillRectangle(theDisplay, man->theWindow, gc, x1, y2, width, height); ++ XFillRectangle(theDisplay, man->theWindow, gc, x2, y2, width, height); ++} ++ ++static void draw_rounded_corners(WinManager *man, ButtonGeometry *g, GC gc) ++{ ++ if (man->roundedcorners) ++ { ++ __draw_rounded_corner(man, g, 0, 0, 2, 1, man->backContext[TITLE_CONTEXT]); ++ __draw_rounded_corner(man, g, 0, 1, 1, 1, man->backContext[TITLE_CONTEXT]); ++ __draw_rounded_corner(man, g, 1, 1, 1, 1, gc); ++ } ++ ++ XFillRectangle(theDisplay, man->theWindow, man->backContext[TITLE_CONTEXT], ++ g->button_x + g->button_w, g->button_y, man->padding, g->button_h); ++} ++ + static void draw_button(WinManager *man, int button, int force) + { + Button *b; +@@ -1825,6 +1854,8 @@ + draw_relief( + man, button_state, &g, context1, + context2); ++ ++ draw_rounded_corners(man, &g, context1); + } + else if (button_state & SELECT_CONTEXT) + { diff --git a/14-Hover.patch b/14-Hover.patch new file mode 100644 index 000000000000..39db38e1b9b4 --- /dev/null +++ b/14-Hover.patch @@ -0,0 +1,294 @@ +diff -U3 -r fvwm/borders.c fvwm/borders.c +--- fvwm/borders.c 2011-12-09 21:47:16.004017302 +0100 ++++ fvwm/borders.c 2011-12-09 21:49:27.363961242 +0100 +@@ -67,6 +67,7 @@ + /* ---------------------------- imports ------------------------------------ */ + + extern Window PressedW; ++extern Window HoverW; + + /* ---------------------------- included code files ------------------------ */ + +@@ -244,6 +245,7 @@ + unsigned clear_bmask : NUMBER_OF_TITLE_BUTTONS; + unsigned draw_bmask : NUMBER_OF_TITLE_BUTTONS; + unsigned max_bmask : NUMBER_OF_TITLE_BUTTONS; ++ unsigned hover_bmask : NUMBER_OF_TITLE_BUTTONS; + ButtonState bstate[NUMBER_OF_TITLE_BUTTONS]; + unsigned is_title_pressed : 1; + unsigned is_title_lit : 1; +@@ -349,8 +351,12 @@ + + /* rules to get button state */ + static ButtonState border_flags_to_button_state( +- int is_pressed, int is_lit, int is_toggled) ++ int is_pressed, int is_lit, int is_toggled, int is_hover) + { ++ if (is_lit && is_hover && Scr.gs.use_hover_buttons) ++ { ++ return BS_ActiveHover; ++ } + if (!is_lit && Scr.gs.use_inactive_buttons) + { + if (is_pressed && Scr.gs.use_inactive_down_buttons) +@@ -871,7 +877,7 @@ + /* check if state changed */ + old_state = border_flags_to_button_state( + (fw->decor_state.parts_inverted & PART_TITLE), +- (fw->decor_state.parts_lit & PART_TITLE), 0); ++ (fw->decor_state.parts_lit & PART_TITLE), 0, 0); + if (old_state != td->tbstate.tstate) + { + draw_parts |= PART_TITLE; +@@ -895,7 +901,8 @@ + old_state = border_flags_to_button_state( + (fw->decor_state.buttons_inverted & mask), + (fw->decor_state.buttons_lit & mask), +- (fw->decor_state.buttons_toggled & mask)); ++ (fw->decor_state.buttons_toggled & mask), ++ (fw->decor_state.buttons_hover & mask)); + if (old_state != td->tbstate.bstate[i]) + { + draw_parts |= PART_BUTTONS; +@@ -4401,6 +4408,7 @@ + fw->decor_state.buttons_inverted = td->tbstate.pressed_bmask; + fw->decor_state.buttons_lit = td->tbstate.lit_bmask; + fw->decor_state.buttons_toggled = td->tbstate.toggled_bmask; ++ fw->decor_state.buttons_hover = td->tbstate.hover_bmask; + + return; + } +@@ -4669,13 +4677,18 @@ + { + tbstate->toggled_bmask |= mask; + } ++ if (FW_W_BUTTON(fw, i) == HoverW) ++ { ++ tbstate->hover_bmask |= mask; ++ } + tbstate->bstate[i] = border_flags_to_button_state( + tbstate->pressed_bmask & mask, + tbstate->lit_bmask & mask, +- tbstate->toggled_bmask & mask); ++ tbstate->toggled_bmask & mask, ++ tbstate->hover_bmask & mask); + } + tbstate->tstate = border_flags_to_button_state( +- tbstate->is_title_pressed, tbstate->is_title_lit, 0); ++ tbstate->is_title_pressed, tbstate->is_title_lit, 0, 0); + } + + static window_parts border_get_titlebar_descr( +@@ -4940,6 +4953,7 @@ + fw->decor_state.buttons_lit = 0; + fw->decor_state.buttons_inverted = 0; + fw->decor_state.buttons_toggled = 0; ++ fw->decor_state.buttons_hover = 0; + return; + } + memset(&td, 0, sizeof(td)); +@@ -4991,6 +5005,7 @@ + fw->decor_state.buttons_toggled = + (fw->decor_state.buttons_toggled & + ~td.tbstate.max_bmask) | td.tbstate.toggled_bmask; ++ fw->decor_state.buttons_hover &= td.tbstate.hover_bmask; + } + + return; +@@ -5081,11 +5096,12 @@ + ButtonState bs; + int is_pressed; + int is_toggled; ++ int is_hover; + int i; + + /* title */ + is_pressed = (FW_W_TITLE(fw) == PressedW); +- bs = border_flags_to_button_state(is_pressed, has_focus, 0); ++ bs = border_flags_to_button_state(is_pressed, has_focus, 0, 0); + if (DFS_USE_BORDER_STYLE(TB_STATE(GetDecor(fw, titlebar))[bs].style)) + { + return 1; +@@ -5098,8 +5114,9 @@ + } + is_pressed = (FW_W_BUTTON(fw, i) == PressedW); + is_toggled = (is_button_toggled(fw, i) == True); ++ is_hover = (FW_W_BUTTON(fw, i) == HoverW); + bs = border_flags_to_button_state( +- is_pressed, (has_focus == True), is_toggled); ++ is_pressed, (has_focus == True), is_toggled, is_hover); + if (DFS_USE_BORDER_STYLE( + TB_STATE(GetDecor(fw, buttons[i]))[bs].style)) + { +@@ -5560,6 +5577,7 @@ + DEFAULT_USE_INACTIVE_BUTTONS; + Scr.gs.use_inactive_down_buttons = + DEFAULT_USE_INACTIVE_DOWN_BUTTONS; ++ Scr.gs.use_hover_buttons = 0; + return; + } + first = False; +@@ -5581,6 +5599,12 @@ + action, &action, + DEFAULT_USE_INACTIVE_DOWN_BUTTONS, True); + } ++ else if (StrEquals("hover", token)) ++ { ++ Scr.gs.use_hover_buttons = ParseToggleArgument( ++ action, &action, ++ 0, True); ++ } + else + { + Scr.gs.use_active_down_buttons = +@@ -5589,6 +5613,7 @@ + DEFAULT_USE_INACTIVE_BUTTONS; + Scr.gs.use_inactive_down_buttons = + DEFAULT_USE_INACTIVE_DOWN_BUTTONS; ++ Scr.gs.use_hover_buttons = 0; + fvwm_msg(ERR, "cmd_button_state", + "Unknown button state %s", token); + return; +diff -U3 -r fvwm/builtins.c fvwm/builtins.c +--- fvwm/builtins.c 2011-12-09 21:47:16.007350549 +0100 ++++ fvwm/builtins.c 2011-12-09 21:49:27.360627994 +0100 +@@ -102,12 +102,16 @@ + { + "ActiveUp", + "ActiveDown", ++ "ActiveHover", + "InactiveUp", + "InactiveDown", ++ "InactiveHover", + "ToggledActiveUp", + "ToggledActiveDown", ++ "ToggledActiveHover", + "ToggledInactiveUp", + "ToggledInactiveDown", ++ "ToggledInactiveHover", + "Active", + "Inactive", + "ToggledActive", +@@ -118,10 +122,13 @@ + "AllInactive", + "AllUp", + "AllDown", ++ "AllHover", + "AllActiveUp", + "AllActiveDown", ++ "AllActiveHover", + "AllInactiveUp", + "AllInactiveDown", ++ "AllInactiveHover", + NULL + }; + +diff -U3 -r fvwm/events.c fvwm/events.c +--- fvwm/events.c 2011-09-27 23:03:34.000000000 +0200 ++++ fvwm/events.c 2011-12-09 21:49:27.360627994 +0100 +@@ -163,6 +163,7 @@ + + int last_event_type = 0; + Window PressedW = None; ++Window HoverW = None; + + /* ---------------------------- local functions ---------------------------- */ + +@@ -1727,6 +1728,23 @@ + return; + } + ++static void redraw_hover(FvwmWindow* fw, Window w) ++{ ++ if (fw) ++ { ++ int i; ++ for (i = 0; i < NUMBER_OF_TITLE_BUTTONS; i++) ++ { ++ if (w == FW_W_BUTTON(fw, i)) ++ { ++ HoverW = FW_W_BUTTON(fw, i); ++ } ++ } ++ border_redraw_decorations(fw); ++ HoverW = None; ++ } ++} ++ + /* ---------------------------- event handlers ----------------------------- */ + + void HandleButtonPress(const evh_args_t *ea) +@@ -1938,6 +1956,8 @@ + ewp = &te->xcrossing; + ENTER_DBG((stderr, "++++++++ en (%d): fw 0x%08x w 0x%08x sw 0x%08xmode 0x%x detail 0x%x '%s'\n", ++ecount, (int)fw, (int)ewp->window, (int)ewp->subwindow, ewp->mode, ewp->detail, fw?fw->visible_name:"(none)")); + ++ redraw_hover(fw, ewp->window); ++ + if ( + ewp->window == Scr.Root && + ewp->detail == NotifyInferior && ewp->mode == NotifyNormal) +@@ -2615,6 +2635,8 @@ + + DBUG("HandleLeaveNotify", "Routine Entered"); + ++ redraw_hover(fw, te->xcrossing.window); ++ + ENTER_DBG((stderr, "-------- ln (%d): fw 0x%08x w 0x%08x sw 0x%08x mode 0x%x detail 0x%x '%s'\n", ++ecount, (int)fw, (int)te->xcrossing.window, (int)te->xcrossing.subwindow, te->xcrossing.mode, te->xcrossing.detail, fw?fw->visible_name:"(none)")); + lwp = &te->xcrossing; + if ( +diff -U3 -r fvwm/fvwm.h fvwm/fvwm.h +--- fvwm/fvwm.h 2011-12-09 21:47:15.997350808 +0100 ++++ fvwm/fvwm.h 2011-12-09 21:49:27.360627994 +0100 +@@ -827,6 +827,7 @@ + unsigned buttons_lit : NUMBER_OF_TITLE_BUTTONS; + unsigned buttons_inverted : NUMBER_OF_TITLE_BUTTONS; + unsigned buttons_toggled : NUMBER_OF_TITLE_BUTTONS; ++ unsigned buttons_hover : NUMBER_OF_TITLE_BUTTONS; + unsigned parts_drawn : 12; + unsigned parts_lit : 12; + unsigned parts_inverted : 12; +diff -U3 -r fvwm/screen.h fvwm/screen.h +--- fvwm/screen.h 2011-12-09 21:47:16.007350549 +0100 ++++ fvwm/screen.h 2011-12-09 21:49:27.360627994 +0100 +@@ -202,12 +202,16 @@ + BS_All = -1, + BS_ActiveUp, + BS_ActiveDown, ++ BS_ActiveHover, + BS_InactiveUp, + BS_InactiveDown, ++ BS_InactiveHover, + BS_ToggledActiveUp, + BS_ToggledActiveDown, ++ BS_ToggledActiveHover, + BS_ToggledInactiveUp, + BS_ToggledInactiveDown, ++ BS_ToggledInactiveHover, + BS_MaxButtonState, + BS_MaxButtonStateMask = BS_MaxButtonState - 1, + BS_Active, +@@ -220,10 +224,13 @@ + BS_AllInactive, + BS_AllUp, + BS_AllDown, ++ BS_AllHover, + BS_AllActiveUp, + BS_AllActiveDown, ++ BS_AllActiveHover, + BS_AllInactiveUp, + BS_AllInactiveDown, ++ BS_AllInactiveHover, + BS_MaxButtonStateName + } ButtonState; + +@@ -513,6 +520,7 @@ + unsigned use_active_down_buttons : 1; + unsigned use_inactive_buttons : 1; + unsigned use_inactive_down_buttons : 1; ++ unsigned use_hover_buttons : 1; + } gs; /* global style structure */ + struct + { +Seulement dans modules/FvwmIconMan: FvwmIconMan.h.orig +Seulement dans modules/FvwmIconMan: readconfig.c.orig +Seulement dans modules/FvwmIconMan: xmanager.c.orig diff --git a/15-FirstItemUnderPointer.patch b/15-FirstItemUnderPointer.patch new file mode 100644 index 000000000000..fd909a735704 --- /dev/null +++ b/15-FirstItemUnderPointer.patch @@ -0,0 +1,17 @@ +diff -U3 -r fvwm/menus.c fvwm/menus.c +--- fvwm/menus.c 2011-12-09 21:49:27.347295005 +0100 ++++ fvwm/menus.c 2011-12-09 21:51:30.387454484 +0100 +@@ -3349,6 +3349,13 @@ + } + context = (*pexc)->w.wcontext; + ++ /* Popup menu with first item (not title) under pointer */ ++ if(MI_IS_TITLE(MR_FIRST_ITEM(mr))) ++ { ++ y-=MI_HEIGHT(MR_FIRST_ITEM(mr)); ++ do_warp_to_item = True; ++ } ++ + /* + * Create a new menu instance (if necessary) + */ diff --git a/16-ThinGeometryProxy.patch b/16-ThinGeometryProxy.patch new file mode 100644 index 000000000000..40fbc0872879 --- /dev/null +++ b/16-ThinGeometryProxy.patch @@ -0,0 +1,30 @@ +Seulement dans fvwm: borders.c.orig +Seulement dans fvwm: builtins.c.orig +Seulement dans fvwm: events.c.orig +Seulement dans fvwm: fvwm.h.orig +Seulement dans fvwm: menus.c.orig +Seulement dans fvwm: screen.h.orig +diff -U3 -r libs/defaults.h libs/defaults.h +--- libs/defaults.h 2011-08-15 18:25:40.000000000 +0200 ++++ libs/defaults.h 2011-12-09 21:55:17.681582269 +0100 +@@ -153,7 +153,7 @@ + #define BROKEN_MINSIZE_LIMIT 30000 + + /* geometry window */ +-#define GEOMETRY_WINDOW_BW 2 /* pixels */ ++#define GEOMETRY_WINDOW_BW 1 /* pixels */ + #define GEOMETRY_WINDOW_STRING " +8888 x +8888 " + #define GEOMETRY_WINDOW_POS_STRING " %+-4d %+-4d " + #define GEOMETRY_WINDOW_SIZE_STRING " %4d x %-4d " +diff -U3 -r modules/FvwmProxy/FvwmProxy.c modules/FvwmProxy/FvwmProxy.c +--- modules/FvwmProxy/FvwmProxy.c 2011-08-07 00:03:32.000000000 +0200 ++++ modules/FvwmProxy/FvwmProxy.c 2011-12-09 21:55:17.681582269 +0100 +@@ -1221,7 +1221,7 @@ + { + XClearWindow(dpy,proxy->proxy); + } +- RelieveRectangle(dpy,proxy->proxy, 0,0, w - 1,h - 1, hi_gc,sh_gc, 2); ++ RelieveRectangle(dpy,proxy->proxy, 0,0, w - 1,h - 1, hi_gc,sh_gc, 1); + + #if 0 + if (proxy->iconname != NULL) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3a10dbcefb0f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,151 @@ +# Maintainer: Philippe DUCRETTET <ecolinux@gmx.com> + +pkgname=fvwm+ +pkgver=2.6.5 +pkgrel=5 +pkgdesc="A powerful ICCCM2 compliant multiple virtual desktop window manager for X11 with some patchs" +arch=('i686' 'x86_64') +url="http://www.fvwm.org" +license=('GPL' 'custom') +depends=('imlib' 'fribidi' 'perl' 'libstroke' 'libxpm' 'libxinerama' 'readline' 'libxft' 'librsvg' 'libxcursor') +provides=('fvwm') +conflicts=('fvwm' 'fvwm-patched' 'fvwm+-cvs' 'fvwm-cvs') +replaces=('fvwm' ) +options=('!emptydirs' '!makeflags') +source=(ftp://ftp.fvwm.org/pub/fvwm/version-2/fvwm-$pkgver.tar.bz2 + fvwm+.desktop + configure.ac-makefile.am.patch + 01-TranslucentMenus.patch + 02-ColourBorders.patch + 03-ResizeOutlineThin.patch + 04-Conditionals.patch + 05-FlatSeparators.patch + 06-BorderUnderTitle.patch + 07-InactiveFont.patch + 08-FluxRoundedCorners.patch + 09-TopBorder.patch + 10-ButtonWidth.patch + 11-MultiBorder.patch + 12-FvwmButtonsTips.patch + 13-FvwmIconMan.patch + 14-Hover.patch + 15-FirstItemUnderPointer.patch + 16-ThinGeometryProxy.patch ) + +patched() { + cd "${srcdir}/fvwm-$pkgver" + #Patching + + #Patch configure.ac and makefile.am files + echo "** Patch configure.ac file and makefile.am files **" + patch -p0 < $startdir/configure.ac-makefile.am.patch || return 1 + + # Enables real transparency on menus + echo "** Applying Translucent menus patch **" + patch -p0 < $startdir/01-TranslucentMenus.patch || return 1 + + # Enables different colours on window's borders + echo "** Applying ColourBorders patch **" + patch -p0 < $startdir/02-ColourBorders.patch || return 1 + + # Enables a single piwel rectangle when resizing + echo "** Applying Resize Outline Thin patch **" + patch -p0 < $startdir/03-ResizeOutlineThin.patch || return 1 + + # Enables other conditions for windows :) + echo "** Applying Conditional patch **" + patch -p0 < $startdir/04-Conditionals.patch || return 1 + + # Enables the use of Flat Separators (single pixel separator) + echo "** Applying flat separators patch **" + patch -p0 < $startdir/05-FlatSeparators.patch || return 1 + + # Adds a border under the titlebar + echo "** Applying border under titlebar patch **" + patch -p0 < $startdir/06-BorderUnderTitle.patch || return 1 + + # Ena1bles the use of a different font for Inactive windows + echo "** Applying inactive fonts patch **" + patch -p0 < $startdir/07-InactiveFont.patch || return 1 + + # A mix of FluxboxHandles and RoundedCorners + # you can't activate both on the same window + # Add corners in fluxbox style + # or add rounded corners + echo "** Applying FluxRounded Corners patch **" + patch -p0 < $startdir/08-FluxRoundedCorners.patch || return 1 + + # Sets the top border to a single pixel + echo "** Applying Top Border patch **" + patch -p0 < $startdir/09-TopBorder.patch || return 1 + + # Sets the width of the title buttons + echo "** Applying Button Width patch **" + patch -p0 < $startdir/10-ButtonWidth.patch || return 1 + + # Enables the use of 8 pixmaps for each borders + echo "** Applying Multiborder patch **" + patch -p0 < $startdir/11-MultiBorder.patch || return 1 + + # Enables the uses of tips on FvwmButtons + echo "** Applying FvwmButtonTips patch **" + patch -p0 < $startdir/12-FvwmButtonsTips.patch || return 1 + + # Enables rounded corners on FvwmIconMan + echo "** Applying FvwmIconMan patch **" + patch -p0 < $startdir/13-FvwmIconMan.patch || return 1 + + # Allows you to specify button pixmaps that will be shown when you move the mouse over the buttons + echo "** Applying Hover patch **" + patch -p0 < $startdir/14-Hover.patch || return 1 + + # Menus with titles are opened so that the first item is under the pointer without warping + echo "** Applying First Item Under Pointer patch **" + patch -p0 < $startdir/15-FirstItemUnderPointer.patch || return 1 + + # The geometry window and proxy windows have a single pixel border + echo "** Applying ThinGeometry patch **" + patch -p0 < $startdir/16-ThinGeometryProxy.patch || return 1 +} + +build() { + cd "${srcdir}/fvwm-${pkgver}" +patched + ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \ + --with-stroke-library \ + --enable-perllib \ + --enable-xinerama \ + --enable-bidi \ + --enable-nls --enable-iconv \ + --enable-xft + make +} + +package() { + cd $startdir/src/fvwm-$pkgver + make DESTDIR="${pkgdir}" install + install -d "${pkgdir}/usr/share/doc/fvwm" + install -D -m644 sample.fvwmrc/{decor_examples,DecorMwm,DecorWin95,new-features,system.*} "${pkgdir}/usr/share/doc/fvwm" + install -D -m644 ../fvwm+.desktop "${pkgdir}/usr/share/xsessions/fvwm+.desktop" + install -D -m644 COPYING "${pkgdir}/usr/share/licenses/fvwm/COPYING" +} + +md5sums=('090ba4e0c517e8b94f71317951530f69' + 'a12c52729a74355838404ee2f5716e0c' + '4f0f03f70e058c7b67390e8f1fa7eb25' + 'd208dc6531e2e6a226fb063d007d6046' + '23b47a21958455fbd0d9d6011b39d009' + '01e4a4cee7780315a275b4428802c49f' + '128c6a2d62a15e5fe95f0a3d1c2033b3' + '209e2c1fa66bc5b502fba2cbe3a04f8a' + '86b6c187be636c0543058f48856b5fb0' + '1cceee901466d34953910bd598332d2f' + 'e053d2f34f527a62831563e26b7cdeb7' + '037562c2c0eb82bc35d1b5b55098f2fc' + '2541576d57ead08ce9772bb219f73f67' + 'ce8d47eea51abe0b594a42d17602b574' + 'c42763877b543c0bcb78a88460671b58' + 'd79ef23cbd62c647ea8d85526f0f2b17' + '09388c4a2f4c86d6e0862e313f2fec86' + 'e4ed5f774e775c67d16f5be8e9783b52' + 'a552a1a273a9fa015271bed929cd275a') diff --git a/configure.ac-makefile.am.patch b/configure.ac-makefile.am.patch new file mode 100644 index 000000000000..4bca4b233a71 --- /dev/null +++ b/configure.ac-makefile.am.patch @@ -0,0 +1,396 @@ +diff -U3 -r bin/Makefile.am bin/Makefile.am +--- bin/Makefile.am 2012-12-30 16:24:27.000000000 +0100 ++++ bin/Makefile.am 2013-05-02 21:22:41.013679388 +0200 +@@ -20,7 +20,7 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm $(xpm_LIBS) $(Xcursor_LIBS) \ + $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) $(Xrender_LIBS) \ + $(Xcursor_LIBS) $(png_LIBS) $(rsvg_LIBS) +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ + $(rsvg_CFLAGS) + + configdir = @FVWM_DATADIR@ +diff -U3 -r configure.ac configure.ac +--- configure.ac 2013-05-02 04:10:21.000000000 +0200 ++++ configure.ac 2013-05-02 21:22:40.997012415 +0200 +@@ -1,7 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. + dnl + AC_PREREQ(2.60) +-AC_INIT(fvwm/fvwm.c) ++AC_INIT(fvwm, 2.6.5) + + dnl should be "yes" only within the released distribution + ISRELEASED=no +@@ -68,8 +68,9 @@ + AC_SUBST(FVWMWORKERSLISTLONG) + AC_SUBST(MANPAGE_PREAMBLE) + +-AM_INIT_AUTOMAKE(fvwm, ${version}) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_SRCDIR(fvwm/fvwm.c) ++AM_INIT_AUTOMAKE ++AC_CONFIG_HEADER(config.h) + + # check for programs needed to build html docs + AC_CHECK_PROG(SED, sed, sed, "") +diff -U3 -r doc/commands/Makefile.am doc/commands/Makefile.am +--- doc/commands/Makefile.am 2008-02-26 15:35:08.000000000 +0100 ++++ doc/commands/Makefile.am 2013-05-02 21:22:41.133681260 +0200 +@@ -17,7 +17,7 @@ + distclean-local: clean + + # All HTML output is generated from XML files. +-%.html : $(srcdir)/%.xml $(srcdir)/../header.html $(srcdir)/../style.css ++*.html :$(srcdir)/%.xml $(srcdir)/../header.html $(srcdir)/../style.css + $(XSLTPROC) --path "$(top_builddir)/doc" --xinclude \ + --stringparam profile.attribute output \ + --stringparam profile.value html \ +diff -U3 -r fvwm/Makefile.am fvwm/Makefile.am +--- fvwm/Makefile.am 2011-12-26 01:54:20.000000000 +0100 ++++ fvwm/Makefile.am 2013-05-02 21:22:41.020346121 +0200 +@@ -38,7 +38,7 @@ + $(X_EXTRA_LIBS) -lm $(iconv_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) \ + $(Bidi_LIBS) $(png_LIBS) $(rsvg_LIBS) $(intl_LIBS) + +-INCLUDES = \ ++AM_CPPFLAGS = \ + -I$(top_srcdir) $(stroke_CFLAGS) $(Xft_CFLAGS) \ + $(xpm_CFLAGS) $(X_CFLAGS) $(iconv_CFLAGS) $(Xrender_CFLAGS) \ + $(Bidi_CFLAGS) $(png_CFLAGS) $(rsvg_CFLAGS) $(intl_CFLAGS) +diff -U3 -r libs/Makefile.am libs/Makefile.am +--- libs/Makefile.am 2009-07-08 21:17:51.000000000 +0200 ++++ libs/Makefile.am 2013-05-02 21:22:41.020346121 +0200 +@@ -30,6 +30,6 @@ + + libfvwm_a_LIBADD = @LIBOBJS@ @ALLOCA@ + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ + $(iconv_CFLAGS) $(Xrender_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS) \ + $(rsvg_CFLAGS) $(intl_CFLAGS) +diff -U3 -r modules/FvwmAnimate/Makefile.am modules/FvwmAnimate/Makefile.am +--- modules/FvwmAnimate/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmAnimate/Makefile.am 2013-05-02 21:22:41.053680007 +0200 +@@ -15,5 +15,5 @@ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) -lm $(png_LIBS) \ + $(rsvg_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(rplay_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(rplay_CFLAGS) $(X_CFLAGS) \ + $(png_CFLAGS) $(Xrender_CFLAGS) +diff -U3 -r modules/FvwmAuto/Makefile.am modules/FvwmAuto/Makefile.am +--- modules/FvwmAuto/Makefile.am 2002-04-05 11:24:30.000000000 +0200 ++++ modules/FvwmAuto/Makefile.am 2013-05-02 21:22:41.053680007 +0200 +@@ -11,5 +11,5 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm \ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) + +diff -U3 -r modules/FvwmBacker/Makefile.am modules/FvwmBacker/Makefile.am +--- modules/FvwmBacker/Makefile.am 2007-01-28 16:29:26.000000000 +0100 ++++ modules/FvwmBacker/Makefile.am 2013-05-02 21:22:41.057013390 +0200 +@@ -17,5 +17,5 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) \ + $(Xrender_LIBS) $(rsvg_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) + +diff -U3 -r modules/FvwmBanner/Makefile.am modules/FvwmBanner/Makefile.am +--- modules/FvwmBanner/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmBanner/Makefile.am 2013-05-02 21:22:41.057013390 +0200 +@@ -17,6 +17,6 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) \ + $(png_LIBS) $(rsvg_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ + $(Xrender_CFLAGS) + +diff -U3 -r modules/FvwmButtons/Makefile.am modules/FvwmButtons/Makefile.am +--- modules/FvwmButtons/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmButtons/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -24,6 +24,6 @@ + $(iconv_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) $(Bidi_LIBS) \ + $(png_LIBS) $(rsvg_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ + $(iconv_CFLAGS) $(Xrender_CFLAGS) $(fribidi_CFLAGS) $(png_CFLAGS) + +diff -U3 -r modules/FvwmCommand/Makefile.am modules/FvwmCommand/Makefile.am +--- modules/FvwmCommand/Makefile.am 2007-08-07 22:17:43.000000000 +0200 ++++ modules/FvwmCommand/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -38,5 +38,5 @@ + # FIXME: + # Despite not using X functions explicitly, the code includes + # fvwmlib.h, which *does* include X headers and xpm.h! +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) + +diff -U3 -r modules/FvwmConsole/Makefile.am modules/FvwmConsole/Makefile.am +--- modules/FvwmConsole/Makefile.am 1999-09-04 18:53:05.000000000 +0200 ++++ modules/FvwmConsole/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -21,4 +21,4 @@ + # FIXME: + # Despite not using X functions explicitly, the code includes + # fvwmlib.h, which *does* include X headers and xpm.h! +-INCLUDES = -I$(top_srcdir) $(readline_CFLAGS) $(xpm_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(readline_CFLAGS) $(xpm_CFLAGS) $(X_CFLAGS) +diff -U3 -r modules/FvwmCpp/Makefile.am modules/FvwmCpp/Makefile.am +--- modules/FvwmCpp/Makefile.am 2002-04-05 11:24:31.000000000 +0200 ++++ modules/FvwmCpp/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -14,7 +14,7 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm -lm \ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) + AM_CFLAGS = -DFVWM_MODULEDIR=\"$(FVWM_MODULEDIR)\" \ + -DFVWM_DATADIR=\"$(FVWM_DATADIR)\" \ + -DFVWM_CPP='"$(FVWM_CPP)"' +diff -U3 -r modules/FvwmDebug/Makefile.am modules/FvwmDebug/Makefile.am +--- modules/FvwmDebug/Makefile.am 2009-03-22 14:14:56.000000000 +0100 ++++ modules/FvwmDebug/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -18,7 +18,7 @@ + # FIXME: + # Despite not using X functions explicitly, the code includes + # fvwmlib.h, which *does* include X headers and xpm.h! +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) + + _FvwmDebug.1: FvwmDebug + pod2man --center "Fvwm Modules" --release "@VERSION@@VERSIONINFO@" \ +diff -U3 -r modules/FvwmDragWell/Makefile.am modules/FvwmDragWell/Makefile.am +--- modules/FvwmDragWell/Makefile.am 2007-01-28 16:29:26.000000000 +0100 ++++ modules/FvwmDragWell/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -16,5 +16,5 @@ + $(X_LIBS) $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) \ + -lm $(Xrender_LIBS) $(rsvg_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) + +diff -U3 -r modules/FvwmEvent/Makefile.am modules/FvwmEvent/Makefile.am +--- modules/FvwmEvent/Makefile.am 2002-04-05 11:24:31.000000000 +0200 ++++ modules/FvwmEvent/Makefile.am 2013-05-02 21:22:41.060346799 +0200 +@@ -20,4 +20,4 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm $(rplay_LIBS) \ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(rplay_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(rplay_CFLAGS) $(X_CFLAGS) +diff -U3 -r modules/FvwmForm/Makefile.am modules/FvwmForm/Makefile.am +--- modules/FvwmForm/Makefile.am 2010-12-28 05:04:37.000000000 +0100 ++++ modules/FvwmForm/Makefile.am 2013-05-02 21:22:41.063680161 +0200 +@@ -49,7 +49,7 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) \ + -lm $(Xrender_LIBS) $(rsvg_LIBS) $(iconv_LIBS) $(Bidi_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(iconv_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(iconv_CFLAGS) \ + $(Bidi_CFLAGS) $(Xrender_CFLAGS) + + FvwmForm-Setup: FvwmForm-Setup.in Makefile +diff -U3 -r modules/FvwmGtk/Makefile.am modules/FvwmGtk/Makefile.am +--- modules/FvwmGtk/Makefile.am 2004-07-09 17:46:44.000000000 +0200 ++++ modules/FvwmGtk/Makefile.am 2013-05-02 21:22:41.067013527 +0200 +@@ -34,7 +34,7 @@ + $(GTK_LIBS) $(GDK_IMLIB_LIBS) \ + $(GNOME_LIBDIR) $(GNOMEUI_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) \ + $(GTK_CFLAGS) $(GDK_IMLIB_CFLAGS) $(GNOME_INCLUDEDIR) + + clean-local: +diff -U3 -r modules/FvwmIconBox/Makefile.am modules/FvwmIconBox/Makefile.am +--- modules/FvwmIconBox/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmIconBox/Makefile.am 2013-05-02 21:22:41.067013527 +0200 +@@ -21,6 +21,6 @@ + $(iconv_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) $(Bidi_LIBS) \ + $(png_LIBS) $(rsvg_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(xpm_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(xpm_CFLAGS) $(X_CFLAGS) \ + $(iconv_CFLAGS) $(Xrender_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS) + +diff -U3 -r modules/FvwmIconMan/Makefile.am modules/FvwmIconMan/Makefile.am +--- modules/FvwmIconMan/Makefile.am 2007-01-28 16:29:26.000000000 +0100 ++++ modules/FvwmIconMan/Makefile.am 2013-05-02 21:22:41.067013527 +0200 +@@ -23,6 +23,6 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) \ + $(iconv_LIBS) $(Xrender_LIBS) $(rsvg_LIBS) -lm $(Bidi_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) \ + $(iconv_CFLAGS) $(Xrender_CFLAGS) $(Bidi_CFLAGS) + +diff -U3 -r modules/FvwmIdent/Makefile.am modules/FvwmIdent/Makefile.am +--- modules/FvwmIdent/Makefile.am 2007-01-28 16:29:26.000000000 +0100 ++++ modules/FvwmIdent/Makefile.am 2013-05-02 21:22:41.067013527 +0200 +@@ -20,6 +20,6 @@ + $(png_LIBS) $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 -lm \ + $(X_EXTRA_LIBS) $(Xrender_LIBS) $(rsvg_LIBS) $(iconv_LIBS) $(Bidi_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(xpm_CFLAGS) $(png_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(xpm_CFLAGS) $(png_CFLAGS) \ + $(X_CFLAGS) $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) + +diff -U3 -r modules/FvwmM4/Makefile.am modules/FvwmM4/Makefile.am +--- modules/FvwmM4/Makefile.am 2002-04-05 11:24:32.000000000 +0200 ++++ modules/FvwmM4/Makefile.am 2013-05-02 21:22:41.067013527 +0200 +@@ -14,6 +14,6 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm -lm \ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) + AM_CFLAGS = -DFVWM_MODULEDIR=\"$(FVWM_MODULEDIR)\" \ + -DFVWM_DATADIR=\"$(FVWM_DATADIR)\" +diff -U3 -r modules/FvwmPager/Makefile.am modules/FvwmPager/Makefile.am +--- modules/FvwmPager/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmPager/Makefile.am 2013-05-02 21:22:41.067013527 +0200 +@@ -21,6 +21,6 @@ + $(X_EXTRA_LIBS) -lm $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \ + $(Bidi_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ + $(X_CFLAGS) $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) + +diff -U3 -r modules/FvwmProxy/Makefile.am modules/FvwmProxy/Makefile.am +--- modules/FvwmProxy/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmProxy/Makefile.am 2013-05-02 21:22:41.070346947 +0200 +@@ -21,5 +21,5 @@ + $(X_EXTRA_LIBS) -lm $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \ + $(Bidi_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ + $(X_CFLAGS) $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) +diff -U3 -r modules/FvwmRearrange/Makefile.am modules/FvwmRearrange/Makefile.am +--- modules/FvwmRearrange/Makefile.am 2002-10-13 17:50:01.000000000 +0200 ++++ modules/FvwmRearrange/Makefile.am 2013-05-02 21:22:41.070346947 +0200 +@@ -30,5 +30,5 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lm -lfvwm \ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) + +diff -U3 -r modules/FvwmSave/Makefile.am modules/FvwmSave/Makefile.am +--- modules/FvwmSave/Makefile.am 2002-05-29 21:11:18.000000000 +0200 ++++ modules/FvwmSave/Makefile.am 2013-05-02 21:22:41.073680325 +0200 +@@ -11,5 +11,5 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm \ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) + +diff -U3 -r modules/FvwmSaveDesk/Makefile.am modules/FvwmSaveDesk/Makefile.am +--- modules/FvwmSaveDesk/Makefile.am 2002-05-29 21:11:18.000000000 +0200 ++++ modules/FvwmSaveDesk/Makefile.am 2013-05-02 21:22:41.070346947 +0200 +@@ -11,5 +11,5 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm \ + $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) + +diff -U3 -r modules/FvwmScript/Makefile.am modules/FvwmScript/Makefile.am +--- modules/FvwmScript/Makefile.am 2009-02-22 22:24:48.000000000 +0100 ++++ modules/FvwmScript/Makefile.am 2013-05-02 21:22:41.073680325 +0200 +@@ -21,7 +21,7 @@ + $(X_EXTRA_LIBS) -lm $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \ + $(Bidi_LIBS) $(png_LIBS) $(rsvg_LIBS) $(intl_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) \ + $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) $(png_CFLAGS) + + # Need this to get datadir into FvwmScript.c: +diff -U3 -r modules/FvwmScript/Widgets/Makefile.am modules/FvwmScript/Widgets/Makefile.am +--- modules/FvwmScript/Widgets/Makefile.am 2002-05-29 21:11:19.000000000 +0200 ++++ modules/FvwmScript/Widgets/Makefile.am 2013-05-02 21:22:41.117014361 +0200 +@@ -7,5 +7,5 @@ + RadioButton.c Rectangle.c Swallow.c TextField.c Tools.c \ + Tools.h VDipstick.c VScrollBar.c Widget.c + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(Xft_CFLAGS) $(X_CFLAGS) + +diff -U3 -r modules/FvwmScroll/Makefile.am modules/FvwmScroll/Makefile.am +--- modules/FvwmScroll/Makefile.am 2007-01-28 16:29:26.000000000 +0100 ++++ modules/FvwmScroll/Makefile.am 2013-05-02 21:22:41.073680325 +0200 +@@ -17,4 +17,4 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) \ + $(Xrender_LIBS) $(rsvg_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) $(Xrender_CFLAGS) +diff -U3 -r modules/FvwmTaskBar/Makefile.am modules/FvwmTaskBar/Makefile.am +--- modules/FvwmTaskBar/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmTaskBar/Makefile.am 2013-05-02 21:22:41.077013708 +0200 +@@ -22,7 +22,7 @@ + $(X_EXTRA_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) $(iconv_LIBS) \ + $(Bidi_LIBS) $(intl_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(png_CFLAGS) $(Xft_CFLAGS) \ + $(X_CFLAGS) $(Xrender_CFLAGS) $(iconv_CFLAGS) $(Bidi_CFLAGS) \ + $(intl_CFLAGS) + +diff -U3 -r modules/FvwmTheme/Makefile.am modules/FvwmTheme/Makefile.am +--- modules/FvwmTheme/Makefile.am 2002-04-22 10:06:17.000000000 +0200 ++++ modules/FvwmTheme/Makefile.am 2013-05-02 21:22:41.077013708 +0200 +@@ -11,5 +11,5 @@ + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm \ + $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) + +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) + +diff -U3 -r modules/FvwmWharf/Makefile.am modules/FvwmWharf/Makefile.am +--- modules/FvwmWharf/Makefile.am 2007-07-15 14:39:39.000000000 +0200 ++++ modules/FvwmWharf/Makefile.am 2013-05-02 21:22:41.077013708 +0200 +@@ -17,5 +17,5 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) \ + $(rsvg_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) + +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \ + $(Xrender_CFLAGS) +diff -U3 -r modules/FvwmWinList/Makefile.am modules/FvwmWinList/Makefile.am +--- modules/FvwmWinList/Makefile.am 2007-01-28 16:29:26.000000000 +0100 ++++ modules/FvwmWinList/Makefile.am 2013-05-02 21:22:41.080347101 +0200 +@@ -22,6 +22,6 @@ + $(X_PRE_LIBS) $(Xinerama_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) \ + $(Xrender_LIBS) $(rsvg_LIBS) $(iconv_LIBS) $(Bidi_LIBS) + +-INCLUDES = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(Xrender_CFLAGS) \ ++AM_CPPFLAGS = -I$(top_srcdir) $(Xft_CFLAGS) $(X_CFLAGS) $(Xrender_CFLAGS) \ + $(iconv_CFLAGS) $(Bidi_CFLAGS) + +diff -U3 -r tests/hints/Makefile.am tests/hints/Makefile.am +--- tests/hints/Makefile.am 2003-02-11 20:29:17.000000000 +0100 ++++ tests/hints/Makefile.am 2013-05-02 21:22:41.080347101 +0200 +@@ -5,4 +5,4 @@ + + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm \ + $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) +-INCLUDES = -I$(top_srcdir) $(X_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS) +diff -U3 -r utils/Makefile.am utils/Makefile.am +--- utils/Makefile.am 2006-02-11 09:58:26.000000000 +0100 ++++ utils/Makefile.am 2013-05-02 21:22:41.030346290 +0200 +@@ -8,4 +8,4 @@ + + LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm $(xpm_LIBS) \ + $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) $(png_LIBS) +-INCLUDES = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) ++AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) diff --git a/fvwm+.desktop b/fvwm+.desktop new file mode 100644 index 000000000000..e297a6109b70 --- /dev/null +++ b/fvwm+.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=FVWM +Comment=The fvwm window manager +Type=XSession +Exec=/usr/bin/fvwm +TryExec=/usr/bin/fvwm |