Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 191638 | Differences between
and this patch

Collapse All | Expand All

(-)fvwm/colorset.c (+50 lines)
Lines 164-169 Link Here
164
	"NoIconTint",
164
	"NoIconTint",
165
	"IconAlpha",
165
	"IconAlpha",
166
166
167
	"Translucent",
168
	"NoTranslucent",
167
	NULL
169
	NULL
168
};
170
};
169
171
Lines 625-630 Link Here
625
	char *fg_tint = NULL;
627
	char *fg_tint = NULL;
626
	char *bg_tint = NULL;
628
	char *bg_tint = NULL;
627
	char *icon_tint = NULL;
629
	char *icon_tint = NULL;
630
	char *translucent_tint = NULL;
628
	Bool have_pixels_changed = False;
631
	Bool have_pixels_changed = False;
629
	Bool has_icon_pixels_changed = False;
632
	Bool has_icon_pixels_changed = False;
630
	Bool has_fg_changed = False;
633
	Bool has_fg_changed = False;
Lines 637-642 Link Here
637
	Bool has_fg_tint_changed = False;
640
	Bool has_fg_tint_changed = False;
638
	Bool has_bg_tint_changed = False;
641
	Bool has_bg_tint_changed = False;
639
	Bool has_icon_tint_changed = False;
642
	Bool has_icon_tint_changed = False;
643
	Bool has_translucent_tint_changed = False;
640
	Bool has_pixmap_changed = False;
644
	Bool has_pixmap_changed = False;
641
	Bool has_shape_changed = False;
645
	Bool has_shape_changed = False;
642
	Bool has_image_alpha_changed = False;
646
	Bool has_image_alpha_changed = False;
Lines 763-768 Link Here
763
		case 21: /* Plain */
767
		case 21: /* Plain */
764
			has_pixmap_changed = True;
768
			has_pixmap_changed = True;
765
			free_colorset_background(cs, True);
769
			free_colorset_background(cs, True);
770
			cs->is_translucent = False;
771
			cs->translucent_tint_percent = 0;
772
			cs->color_flags &= ~TRANSLUCENT_TINT_SUPPLIED;
773
			has_translucent_tint_changed = True;
766
			break;
774
			break;
767
		case 22: /* NoShape */
775
		case 22: /* NoShape */
768
			has_shape_changed = True;
776
			has_shape_changed = True;
Lines 929-934 Link Here
929
				cs->icon_alpha_percent = tmp;
937
				cs->icon_alpha_percent = tmp;
930
			}
938
			}
931
			break;
939
			break;
940
		case 42: /* Translucent */
941
			cs->is_translucent = True;
942
			parse_simple_tint(
943
				cs, args, &translucent_tint,
944
				TRANSLUCENT_TINT_SUPPLIED,
945
				&has_translucent_tint_changed, &percent,
946
				"Translucent");
947
			if (has_translucent_tint_changed)
948
			{
949
				cs->translucent_tint_percent = percent;
950
			}
951
			break;
952
		case 43: /* NoTranslucent */
953
			cs->is_translucent = False;
954
			cs->translucent_tint_percent = 0;
955
			cs->color_flags &= ~TRANSLUCENT_TINT_SUPPLIED;
956
			has_translucent_tint_changed = True;
957
			break;
932
		default:
958
		default:
933
			/* test for ?Gradient */
959
			/* test for ?Gradient */
934
			if (option[0] && StrEquals(&option[1], "Gradient"))
960
			if (option[0] && StrEquals(&option[1], "Gradient"))
Lines 1615-1620 Link Here
1615
	}
1641
	}
1616
1642
1617
	/*
1643
	/*
1644
	 * ---------- change the translucent tint colour ----------
1645
	 */
1646
	if (has_translucent_tint_changed)
1647
	{
1648
		/* user specified colour */
1649
		if (translucent_tint != NULL)
1650
		{
1651
			PictureFreeColors(
1652
				dpy, Pcmap, &cs->translucent_tint, 1, 0, True);
1653
			cs->translucent_tint = GetColor(translucent_tint);
1654
		}
1655
		else
1656
		{
1657
			/* default */
1658
			PictureFreeColors(
1659
				dpy, Pcmap, &cs->translucent_tint, 1, 0, True);
1660
			cs->translucent_tint = GetColor(black);
1661
		}
1662
	}
1663
1664
	/*
1618
	 * ---------- send new colorset to fvwm and clean up ----------
1665
	 * ---------- send new colorset to fvwm and clean up ----------
1619
	 */
1666
	 */
1620
	/* make sure the server has this to avoid races */
1667
	/* make sure the server has this to avoid races */
Lines 1710-1715 Link Here
1710
			ncs->fgsh = GetColor(white);
1757
			ncs->fgsh = GetColor(white);
1711
			ncs->tint = GetColor(black);
1758
			ncs->tint = GetColor(black);
1712
			ncs->icon_tint = GetColor(black);
1759
			ncs->icon_tint = GetColor(black);
1760
			ncs->translucent_tint = GetColor(black);
1713
			ncs->pixmap = XCreatePixmapFromBitmapData(
1761
			ncs->pixmap = XCreatePixmapFromBitmapData(
1714
				dpy, Scr.NoFocusWin,
1762
				dpy, Scr.NoFocusWin,
1715
				&g_bits[4 * (nColorsets % 3)], 4, 4,
1763
				&g_bits[4 * (nColorsets % 3)], 4, 4,
Lines 1727-1732 Link Here
1727
			ncs->fgsh = GetForeShadow(ncs->fg, ncs->bg);
1775
			ncs->fgsh = GetForeShadow(ncs->fg, ncs->bg);
1728
			ncs->tint = GetColor(black);
1776
			ncs->tint = GetColor(black);
1729
			ncs->icon_tint = GetColor(black);
1777
			ncs->icon_tint = GetColor(black);
1778
			ncs->translucent_tint = GetColor(black);
1730
		}
1779
		}
1731
		ncs->fg_tint = ncs->bg_tint = GetColor(black);
1780
		ncs->fg_tint = ncs->bg_tint = GetColor(black);
1732
		/* set flags for fg contrast, bg average */
1781
		/* set flags for fg contrast, bg average */
Lines 1738-1743 Link Here
1738
		ncs->icon_alpha_percent = 100;
1787
		ncs->icon_alpha_percent = 100;
1739
		ncs->tint_percent = 0;
1788
		ncs->tint_percent = 0;
1740
		ncs->icon_tint_percent = 0;
1789
		ncs->icon_tint_percent = 0;
1790
		ncs->translucent_tint_percent = 0;
1741
		ncs->fg_tint_percent = ncs->bg_tint_percent = 0;
1791
		ncs->fg_tint_percent = ncs->bg_tint_percent = 0;
1742
		ncs->dither = (PictureDitherByDefault())? True:False;
1792
		ncs->dither = (PictureDitherByDefault())? True:False;
1743
		nColorsets++;
1793
		nColorsets++;
(-)fvwm/menuroot.h (+3 lines)
Lines 146-151 Link Here
146
		int d_npixels;
146
		int d_npixels;
147
	} stored_pixels;
147
	} stored_pixels;
148
	/* alloc pixels when dithering is used for gradients */
148
	/* alloc pixels when dithering is used for gradients */
149
	/* x,y XMapRaise */
150
	int x;
151
	int y;
149
} MenuRootDynamic;
152
} MenuRootDynamic;
150
153
151
/* access macros to dynamic menu members */
154
/* access macros to dynamic menu members */
(-)fvwm/menus.c (-23 / +192 lines)
Lines 75-80 Link Here
75
75
76
/* ---------------------------- local macros ------------------------------- */
76
/* ---------------------------- local macros ------------------------------- */
77
77
78
#define MENU_IS_TRANSLUCENT(mr,cs) \
79
	(!MR_IS_TEAR_OFF_MENU(mr) && CSET_IS_TRANSLUCENT(cs))
80
#define MENU_IS_TRANSPARENT(mr,cs) \
81
	(MENU_IS_TRANSLUCENT(mr,cs) || CSET_IS_TRANSPARENT(cs))
82
#define MR_IS_TRANSLUCENT_MENU(mr)  \
83
	(!MR_IS_TEAR_OFF_MENU(mr) && MR_STYLE(mr) && \
84
	ST_HAS_MENU_CSET(MR_STYLE(mr)) && CSET_IS_TRANSLUCENT( \
85
						ST_CSET_MENU(MR_STYLE(mr))))
86
#define MR_IS_TRANSPARENT_MENU(mr) \
87
	(MR_IS_TRANSLUCENT_MENU(mr) || (MR_STYLE(mr) && \
88
	ST_HAS_MENU_CSET(MR_STYLE(mr)) && CSET_IS_TRANSPARENT( \
89
						ST_CSET_MENU(MR_STYLE(mr)))))
90
78
/* ---------------------------- imports ------------------------------------ */
91
/* ---------------------------- imports ------------------------------------ */
79
92
80
/* This external is safe. It's written only during startup. */
93
/* This external is safe. It's written only during startup. */
Lines 188-193 Link Here
188
} mloop_static_info_t;
201
} mloop_static_info_t;
189
202
190
/* ---------------------------- forward declarations ----------------------- */
203
/* ---------------------------- forward declarations ----------------------- */
204
static MenuRoot *seek_submenu_instance(
205
	MenuRoot *parent_menu, MenuItem *parent_item);
191
206
192
/* ---------------------------- local variables ---------------------------- */
207
/* ---------------------------- local variables ---------------------------- */
193
208
Lines 353-364 Link Here
353
		Bool transparent_bg = False;
368
		Bool transparent_bg = False;
354
369
355
		/* move it back */
370
		/* move it back */
356
		if (ST_HAS_MENU_CSET(MR_STYLE(mr)) &&
371
		if (MR_IS_TRANSPARENT_MENU(mr))
357
		    CSET_IS_TRANSPARENT(ST_CSET_MENU(MR_STYLE(mr))))
358
		{
372
		{
359
			transparent_bg = True;
373
			transparent_bg = True;
360
			get_menu_repaint_transparent_parameters(
374
			get_menu_repaint_transparent_parameters(
361
				&mrtp, mr, fw);
375
				&mrtp, mr, fw);
376
			if (MR_IS_TRANSLUCENT_MENU(mr) && MR_SUBMENU_ITEM(mr))
377
			{
378
				MenuRoot *smr;
379
				smr = seek_submenu_instance(
380
					mr, MR_SUBMENU_ITEM(mr));
381
				if (smr)
382
				{
383
					/* just unmap it here, popdown later */
384
					XUnmapWindow(dpy, MR_WINDOW(smr));
385
				}
386
			}
362
		}
387
		}
363
		AnimatedMoveOfWindow(
388
		AnimatedMoveOfWindow(
364
			MR_WINDOW(mr), act_x, act_y, act_x - MR_XANIMATION(mr),
389
			MR_WINDOW(mr), act_x, act_y, act_x - MR_XANIMATION(mr),
Lines 1779-1784 Link Here
1779
				/* Doh.  Use the standard display instead. */
1804
				/* Doh.  Use the standard display instead. */
1780
				MR_CREATE_DPY(mr) = dpy;
1805
				MR_CREATE_DPY(mr) = dpy;
1781
			}
1806
			}
1807
			MR_IS_TEAR_OFF_MENU(mr) = 1;
1782
		}
1808
		}
1783
		else
1809
		else
1784
		{
1810
		{
Lines 2594-2600 Link Here
2594
	}
2620
	}
2595
	MR_IS_PAINTED(mr) = 1;
2621
	MR_IS_PAINTED(mr) = 1;
2596
	/* paint the menu background */
2622
	/* paint the menu background */
2597
	if (ms && ST_HAS_MENU_CSET(ms))
2623
	if (MR_IS_TRANSLUCENT_MENU(mr))
2624
	{
2625
		Pixmap trans = None;
2626
		FvwmRenderAttributes fra;
2627
		colorset_t *colorset = &Colorset[ST_CSET_MENU(ms)];
2628
	
2629
		fra.mask = 0;
2630
		if (colorset->translucent_tint_percent > 0)
2631
		{
2632
			fra.mask = FRAM_HAVE_TINT;
2633
			fra.tint = colorset->translucent_tint;
2634
			fra.tint_percent = colorset->translucent_tint_percent;
2635
		}
2636
		if (MR_IS_BACKGROUND_SET(mr) == False)
2637
		{
2638
			trans = PGraphicsCreateTranslucent(
2639
				dpy, MR_WINDOW(mr), &fra,
2640
				BACK_GC(ST_MENU_INACTIVE_GCS(ms)),
2641
				MR_X(mr), MR_Y(mr), MR_WIDTH(mr), MR_HEIGHT(mr));
2642
			XMapRaised(dpy, MR_WINDOW(mr));
2643
			if (trans != None)
2644
			{
2645
				XSetWindowBackgroundPixmap(
2646
					dpy, MR_WINDOW(mr), trans);
2647
				MR_IS_BACKGROUND_SET(mr) = True;
2648
				clear_expose_menu_area(MR_WINDOW(mr), pevent);
2649
				XFreePixmap(dpy, trans);
2650
			}
2651
		}
2652
	}
2653
	else if (ms && ST_HAS_MENU_CSET(ms))
2598
	{
2654
	{
2599
		if (MR_IS_BACKGROUND_SET(mr) == False)
2655
		if (MR_IS_BACKGROUND_SET(mr) == False)
2600
		{
2656
		{
Lines 3401-3410 Link Here
3401
					MR_HAS_POPPED_UP_RIGHT(mr) = 0;
3457
					MR_HAS_POPPED_UP_RIGHT(mr) = 0;
3402
				}
3458
				}
3403
				MR_XANIMATION(parent_menu) += end_x - prev_x;
3459
				MR_XANIMATION(parent_menu) += end_x - prev_x;
3404
				if (ST_HAS_MENU_CSET(MR_STYLE(parent_menu)) &&
3460
				if (MR_IS_TRANSPARENT_MENU(parent_menu))
3405
				    CSET_IS_TRANSPARENT(
3406
					    ST_CSET_MENU(
3407
						    MR_STYLE(parent_menu))))
3408
				{
3461
				{
3409
					transparent_bg = True;
3462
					transparent_bg = True;
3410
					get_menu_repaint_transparent_parameters(
3463
					get_menu_repaint_transparent_parameters(
Lines 3583-3592 Link Here
3583
	 */
3636
	 */
3584
3637
3585
	XMoveWindow(dpy, MR_WINDOW(mr), x, y);
3638
	XMoveWindow(dpy, MR_WINDOW(mr), x, y);
3639
	MR_X(mr) = x;
3640
	MR_Y(mr) = y;
3586
	XSelectInput(dpy, MR_WINDOW(mr), event_mask);
3641
	XSelectInput(dpy, MR_WINDOW(mr), event_mask);
3587
	XMapRaised(dpy, MR_WINDOW(mr));
3642
	if (MR_IS_TRANSLUCENT_MENU(mr))
3588
	if (popdown_window)
3643
	{
3589
		XUnmapWindow(dpy, popdown_window);
3644
		if (popdown_window)
3645
			XUnmapWindow(dpy, popdown_window);
3646
		paint_menu(mr, NULL, fw);
3647
	}
3648
	else
3649
	{
3650
		XMapRaised(dpy, MR_WINDOW(mr));
3651
		if (popdown_window)
3652
			XUnmapWindow(dpy, popdown_window);
3653
	}
3590
	XFlush(dpy);
3654
	XFlush(dpy);
3591
	MR_MAPPED_COPIES(mr)++;
3655
	MR_MAPPED_COPIES(mr)++;
3592
	MST_USAGE_COUNT(mr)++;
3656
	MST_USAGE_COUNT(mr)++;
Lines 6123-6138 Link Here
6123
	{
6187
	{
6124
		last = True;
6188
		last = True;
6125
	}
6189
	}
6126
	if (!last && CSET_IS_TRANSPARENT_PR_TINT(ST_CSET_MENU(ms)))
6190
	if (!last &&
6191
	    (CSET_IS_TRANSPARENT_PR_TINT(ST_CSET_MENU(ms)) ||
6192
	     MR_IS_TRANSLUCENT_MENU(mr)))
6127
	{
6193
	{
6128
		/* too slow ... */
6194
		/* too slow ... */
6129
		return;
6195
		return;
6130
	}
6196
	}
6131
	SetWindowBackgroundWithOffset(
6197
	if (MR_IS_TRANSLUCENT_MENU(mr))
6132
		dpy, MR_WINDOW(mr), step_x - current_x, step_y - current_y,
6198
	{
6133
		MR_WIDTH(mr), MR_HEIGHT(mr),
6199
		Pixmap trans, tmp;
6134
		&Colorset[ST_CSET_MENU(ms)], Pdepth,
6200
		FvwmRenderAttributes fra;
6135
		FORE_GC(MST_MENU_INACTIVE_GCS(mr)), False);
6201
		colorset_t *colorset = &Colorset[ST_CSET_MENU(ms)];
6202
6203
		fra.mask = 0;
6204
		if (colorset->translucent_tint_percent > 0)
6205
		{
6206
			fra.mask = FRAM_HAVE_TINT;
6207
			fra.tint = colorset->translucent_tint;
6208
			fra.tint_percent = colorset->translucent_tint_percent;
6209
		}
6210
		if (current_x == step_x) 
6211
		{
6212
			/* Reuse the old pixmap for the part of the menu 
6213
			 * that has not moved. (This can be extended to get
6214
			 * two new rectangles, one in each direction)
6215
			 * 
6216
			 * It saves the unmapping of the window and makes 
6217
			 * Things less flickering.
6218
			 */
6219
			GC my_gc;
6220
			unsigned long valuemask = GCSubwindowMode;
6221
			XGCValues values;
6222
			int out_y=0;
6223
			values.subwindow_mode = IncludeInferiors;
6224
			if (step_y < 0)
6225
			{
6226
				out_y = -step_y;
6227
			}
6228
			trans = XCreatePixmap(dpy, MR_WINDOW(mr), MR_WIDTH(mr),
6229
					      MR_HEIGHT(mr), Pdepth);
6230
			my_gc = fvwmlib_XCreateGC(dpy,  MR_WINDOW(mr), 0, NULL);
6231
			XChangeGC(dpy, my_gc, valuemask, &values);
6232
6233
			XClearWindow(dpy, MR_WINDOW(mr));
6234
6235
			if (current_y < step_y)
6236
			{
6237
				XCopyArea(dpy, MR_WINDOW(mr), trans, my_gc, 0, 
6238
					  step_y-current_y, MR_WIDTH(mr), 
6239
					  MR_HEIGHT(mr)-(step_y-current_y),
6240
					  0,0);
6241
				tmp = PGraphicsCreateTranslucent(
6242
					dpy, MR_WINDOW(mr), &fra,
6243
					BACK_GC(ST_MENU_INACTIVE_GCS(ms)),
6244
					current_x, current_y+MR_HEIGHT(mr), 
6245
					MR_WIDTH(mr), step_y-current_y);
6246
6247
				XCopyArea(dpy, tmp, trans, my_gc, 0, 0,
6248
					  MR_WIDTH(mr), step_y-current_y,0,
6249
					  MR_HEIGHT(mr)-(step_y-current_y));
6250
			}
6251
			else 
6252
			{
6253
				XCopyArea(dpy, MR_WINDOW(mr), trans, my_gc, 0, 
6254
					  0, MR_WIDTH(mr), 
6255
					  MR_HEIGHT(mr)-(current_y-step_y), 0,
6256
					  current_y-step_y);
6257
				tmp = PGraphicsCreateTranslucent(
6258
					dpy, MR_WINDOW(mr), &fra,
6259
					BACK_GC(ST_MENU_INACTIVE_GCS(ms)),
6260
					current_x,step_y, MR_WIDTH(mr),
6261
					current_y-step_y);
6262
				XCopyArea(dpy, tmp, trans, my_gc, 0, 0,
6263
					  MR_WIDTH(mr), current_y-step_y,0,
6264
					  out_y);
6265
			}
6266
			MR_X(mr) = step_x;
6267
			MR_Y(mr) = step_y;
6268
			XFreePixmap(dpy, tmp);
6269
			XFreeGC(dpy,my_gc);
6270
		}		
6271
		else
6272
		{
6273
			XUnmapWindow(dpy, MR_WINDOW(mr));
6274
			MR_X(mr) = step_x;
6275
			MR_Y(mr) = step_y;
6276
			trans = PGraphicsCreateTranslucent(
6277
				dpy, MR_WINDOW(mr), &fra,
6278
				BACK_GC(ST_MENU_INACTIVE_GCS(ms)),
6279
				step_x, step_y, MR_WIDTH(mr), 
6280
				MR_HEIGHT(mr));
6281
			XMapRaised(dpy, MR_WINDOW(mr));
6282
		}
6283
		XSetWindowBackgroundPixmap(
6284
			dpy, MR_WINDOW(mr), trans);
6285
		XFreePixmap(dpy, trans);
6286
		if (current_x == step_x)
6287
		{
6288
			/* Redraw the border */
6289
			RelieveRectangle(
6290
				dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr) - 1,
6291
				MR_HEIGHT(mr) - 1, (Pdepth < 2) ?
6292
				SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)) :
6293
				HILIGHT_GC(MST_MENU_INACTIVE_GCS(mr)),
6294
				SHADOW_GC(MST_MENU_INACTIVE_GCS(mr)), 
6295
				MST_BORDER_WIDTH(mr));
6296
		}
6297
	}
6298
	else
6299
	{
6300
		SetWindowBackgroundWithOffset(
6301
			dpy, MR_WINDOW(mr), step_x - current_x,
6302
			step_y - current_y, MR_WIDTH(mr), MR_HEIGHT(mr),
6303
			&Colorset[ST_CSET_MENU(ms)], Pdepth,
6304
			FORE_GC(MST_MENU_INACTIVE_GCS(mr)), False);
6305
	}
6136
}
6306
}
6137
6307
6138
6308
Lines 6173-6182 Link Here
6173
	}
6343
	}
6174
	if (!is_bg_set)
6344
	if (!is_bg_set)
6175
	{
6345
	{
6176
		SetWindowBackground(
6346
		update_transparent_menu_bg(prtm, x, y, x, y, end_x, end_y);
6177
			dpy, MR_WINDOW(mr), MR_WIDTH(mr), MR_HEIGHT(mr),
6178
			&Colorset[ST_CSET_MENU(ms)], Pdepth,
6179
			FORE_GC(MST_MENU_INACTIVE_GCS(mr)), False);
6180
	}
6347
	}
6181
	/* redraw the background of non active item */
6348
	/* redraw the background of non active item */
6182
	for (mi = MR_FIRST_ITEM(mr); mi != NULL; mi = MI_NEXT_ITEM(mi))
6349
	for (mi = MR_FIRST_ITEM(mr); mi != NULL; mi = MI_NEXT_ITEM(mi))
Lines 6813-6822 Link Here
6813
				SetWindowBackground(
6980
				SetWindowBackground(
6814
					dpy, MR_WINDOW(mr), MR_WIDTH(mr),
6981
					dpy, MR_WINDOW(mr), MR_WIDTH(mr),
6815
					MR_HEIGHT(mr),
6982
					MR_HEIGHT(mr),
6816
					&Colorset[ST_CSET_MENU(ms)],
6983
					&Colorset[ST_CSET_MENU(ms)], Pdepth,
6817
					Pdepth,
6818
					FORE_GC(MST_MENU_INACTIVE_GCS(mr)),
6984
					FORE_GC(MST_MENU_INACTIVE_GCS(mr)),
6819
					True);
6985
					False);
6986
				XClearArea(
6987
					dpy, MR_WINDOW(mr), 0, 0, MR_WIDTH(mr),
6988
					MR_HEIGHT(mr), True);
6820
			}
6989
			}
6821
			else if ((ST_HAS_ACTIVE_CSET(ms) &&
6990
			else if ((ST_HAS_ACTIVE_CSET(ms) &&
6822
				  ST_CSET_ACTIVE(ms) == cset) ||
6991
				  ST_CSET_ACTIVE(ms) == cset) ||
(-)fvwm/menus.h (+3 lines)
Lines 15-20 Link Here
15
#define IS_MENU_RETURN(x) \
15
#define IS_MENU_RETURN(x) \
16
  ((x)==MENU_DONE || (x)==MENU_ABORTED || (x)==MENU_SUBMENU_TORN_OFF)
16
  ((x)==MENU_DONE || (x)==MENU_ABORTED || (x)==MENU_SUBMENU_TORN_OFF)
17
17
18
#define MR_X(m)                     ((m)->d->x)
19
#define MR_Y(m)                     ((m)->d->y)
20
18
struct MenuRoot;
21
struct MenuRoot;
19
struct MenuStyle;
22
struct MenuStyle;
20
struct MenuReturn;
23
struct MenuReturn;
(-)libs/Colorset.h (+10 lines)
Lines 51-56 Link Here
51
	Bool dither;
51
	Bool dither;
52
	Bool allows_buffered_transparency;
52
	Bool allows_buffered_transparency;
53
	Bool is_maybe_root_transparent;
53
	Bool is_maybe_root_transparent;
54
	/* only use by fvwm menu (non tear-off) */
55
	Bool is_translucent;
56
	Pixel translucent_tint;
57
	unsigned int translucent_tint_percent : 7;
54
#endif
58
#endif
55
} colorset_t;
59
} colorset_t;
56
60
Lines 78-83 Link Here
78
#define FG_TINT_SUPPLIED  0x100
82
#define FG_TINT_SUPPLIED  0x100
79
#define BG_TINT_SUPPLIED  0x200
83
#define BG_TINT_SUPPLIED  0x200
80
#define ICON_TINT_SUPPLIED 0x400
84
#define ICON_TINT_SUPPLIED 0x400
85
#define TRANSLUCENT_TINT_SUPPLIED 0x800
81
#endif
86
#endif
82
87
83
/* colorsets are stored as an array of structs to permit fast dereferencing */
88
/* colorsets are stored as an array of structs to permit fast dereferencing */
Lines 153-158 Link Here
153
    (cset != NULL && cset->pixmap == ParentRelative && \
158
    (cset != NULL && cset->pixmap == ParentRelative && \
154
     cset->tint_percent > 0)
159
     cset->tint_percent > 0)
155
160
161
#define CSET_IS_TRANSLUCENT(cset) \
162
    (cset >= 0 && Colorset[cset].is_translucent)
163
#define CSETS_IS_TRANSLUCENT(cset) \
164
    (cset && cset->is_translucent)
165
156
#ifndef FVWM_COLORSET_PRIVATE
166
#ifndef FVWM_COLORSET_PRIVATE
157
/* Create n new colorsets, fvwm/colorset.c does its own thing (different size)
167
/* Create n new colorsets, fvwm/colorset.c does its own thing (different size)
158
 */
168
 */
(-)libs/PictureGraphics.c (-1 / +1 lines)
Lines 1340-1346 Link Here
1340
	}
1340
	}
1341
}
1341
}
1342
1342
1343
#if 0 /* humm... maybe useful one day with menus */
1343
#if 1 /* humm... maybe useful one day with menus */
1344
Pixmap PGraphicsCreateTranslucent(
1344
Pixmap PGraphicsCreateTranslucent(
1345
	Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc,
1345
	Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc,
1346
	int x, int y, int width, int height)
1346
	int x, int y, int width, int height)
(-)libs/PictureGraphics.h (-1 / +3 lines)
Lines 122-128 Link Here
122
	Display *dpy, Window win, Pixel tint, int tint_percent,
122
	Display *dpy, Window win, Pixel tint, int tint_percent,
123
	Drawable dest, Bool dest_is_a_window, GC gc, GC mono_gc, GC alpha_gc,
123
	Drawable dest, Bool dest_is_a_window, GC gc, GC mono_gc, GC alpha_gc,
124
	int dest_x, int dest_y, int dest_w, int dest_h);
124
	int dest_x, int dest_y, int dest_w, int dest_h);
125
125
Pixmap PGraphicsCreateTranslucent(
126
	Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc,
127
	int x, int y, int width, int height);
126
/* never used ! */
128
/* never used ! */
127
Pixmap PGraphicsCreateDitherPixmap(
129
Pixmap PGraphicsCreateDitherPixmap(
128
	Display *dpy, Window win, Drawable src, Pixmap mask, int depth, GC gc,
130
	Display *dpy, Window win, Drawable src, Pixmap mask, int depth, GC gc,

Return to bug 191638