Compare commits
29 commits
b5498bad11
...
042af42400
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
042af42400 | ||
|
|
02627756f1 | ||
|
|
51d32a9a77 | ||
|
|
ad3c3e774c | ||
|
|
9be6da0370 | ||
|
|
f7354190f7 | ||
|
|
4da3d6d87c | ||
|
|
821244c2ae | ||
|
|
a12b73a36f | ||
|
|
49ac4d1e14 | ||
|
|
0aad70af58 | ||
|
|
5d5fe76795 | ||
|
|
9860867e10 | ||
|
|
3c7bcf616d | ||
|
|
50286bb861 | ||
|
|
c7503f5737 | ||
|
|
137bb152b3 | ||
|
|
48f696499d | ||
|
|
cae36041b4 | ||
|
|
304293d4e1 | ||
|
|
5a65d4a512 | ||
|
|
0f0f929022 | ||
|
|
2a20129a48 | ||
|
|
f2c7f80738 | ||
|
|
0b4c1084f0 | ||
|
|
816061be47 | ||
|
|
292f3ae44d | ||
|
|
c87ded477c | ||
|
|
4397a1814f |
8 changed files with 63 additions and 97 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (6e97047, 2025-08-09) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
|
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.2 (98610fc, 2025-01-26) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
|
||||||
|
|
||||||
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
|
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
|
||||||
```c
|
```c
|
||||||
|
|
@ -15,8 +15,6 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
2025-10-28 - Added the selectionbg-alpha patch
|
|
||||||
|
|
||||||
2025-02-20 - Added the drag-n-drop and open-selected-text patches
|
2025-02-20 - Added the drag-n-drop and open-selected-text patches
|
||||||
|
|
||||||
2024-05-31 - Added the anygeometry patch
|
2024-05-31 - Added the anygeometry patch
|
||||||
|
|
@ -262,10 +260,6 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
||||||
- [right-click-to-plumb](https://st.suckless.org/patches/right_click_to_plumb/)
|
- [right-click-to-plumb](https://st.suckless.org/patches/right_click_to_plumb/)
|
||||||
- allows you to right-click on some selected text to send it to the plumbing program of choice
|
- allows you to right-click on some selected text to send it to the plumbing program of choice
|
||||||
|
|
||||||
- [selectionbg-alpha](https://st.suckless.org/patches/selectionbg-alpha/)
|
|
||||||
- allows for the selection to have a transparent background when combined with the alpha
|
|
||||||
and selection colors patches
|
|
||||||
|
|
||||||
- [scrollback](https://st.suckless.org/patches/scrollback/)
|
- [scrollback](https://st.suckless.org/patches/scrollback/)
|
||||||
- allows you scroll back through terminal output using keyboard shortcuts or mousewheel
|
- allows you scroll back through terminal output using keyboard shortcuts or mousewheel
|
||||||
|
|
||||||
|
|
|
||||||
44
config.def.h
44
config.def.h
|
|
@ -162,7 +162,7 @@ unsigned int tabspaces = 8;
|
||||||
|
|
||||||
#if ALPHA_PATCH
|
#if ALPHA_PATCH
|
||||||
/* bg opacity */
|
/* bg opacity */
|
||||||
float alpha = 0.8;
|
float alpha = 0.9;
|
||||||
#if ALPHA_GRADIENT_PATCH
|
#if ALPHA_GRADIENT_PATCH
|
||||||
float grad_alpha = 0.54; //alpha value that'll change
|
float grad_alpha = 0.54; //alpha value that'll change
|
||||||
float stat_alpha = 0.46; //constant alpha value that'll get added to grad_alpha
|
float stat_alpha = 0.46; //constant alpha value that'll get added to grad_alpha
|
||||||
|
|
@ -183,28 +183,28 @@ char *xdndescchar = " !\"#$&'()*;<>?[\\]^`{|}~";
|
||||||
|
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
/* Terminal colors (16 first used in escape sequence) */
|
||||||
static char *colorname[] = {
|
static char *colorname[] = {
|
||||||
"#011627", /* hard contrast: #1d2021 / soft contrast: #32302f */
|
"#000000",
|
||||||
"#d3423e",
|
"#ff3333",
|
||||||
"#2aa298",
|
"#86b200",
|
||||||
"#daaa01",
|
"#f19618",
|
||||||
"#4876d6",
|
"#41a6d9",
|
||||||
"#403f53",
|
"#f07078",
|
||||||
"#08916a",
|
"#4cbe99",
|
||||||
"#7a8181",
|
"#ffffff",
|
||||||
"#7a8181",
|
"#323232",
|
||||||
"#f76e6e",
|
"#ff6565",
|
||||||
"#49d0c5",
|
"#b8e532",
|
||||||
"#dac26b",
|
"#ffc849",
|
||||||
"#5ca7e4",
|
"#73d7ff",
|
||||||
"#697098",
|
"#ffa3aa",
|
||||||
"#00c990",
|
"#7ff0cb",
|
||||||
"#989fb1",
|
"#ffffff",
|
||||||
[255] = 0,
|
[255] = 0,
|
||||||
/* more colors can be added after 255 to use with DefaultXX */
|
/* more colors can be added after 255 to use with DefaultXX */
|
||||||
"#403f53", /* 256 -> cursor */
|
"#403f53", /* 256 -> cursor */
|
||||||
"#f2f2f2", /* 257 -> rev cursor*/
|
"#f0ede4", /* 257 -> rev cursor*/
|
||||||
"#ffffff", /* 258 -> bg */
|
"#fafafa", /* 258 -> bg */
|
||||||
"#403f53", /* 259 -> fg */
|
"#5b6673", /* 259 -> fg */
|
||||||
};
|
};
|
||||||
|
|
||||||
#if DARKMAN_PATCH
|
#if DARKMAN_PATCH
|
||||||
|
|
@ -469,14 +469,14 @@ static Shortcut shortcuts[] = {
|
||||||
{ XK_NO_MOD, XK_F11, fullscreen, {.i = 0} },
|
{ XK_NO_MOD, XK_F11, fullscreen, {.i = 0} },
|
||||||
{ MODKEY, XK_Return, fullscreen, {.i = 0} },
|
{ MODKEY, XK_Return, fullscreen, {.i = 0} },
|
||||||
#endif // FULLSCREEN_PATCH
|
#endif // FULLSCREEN_PATCH
|
||||||
#if SCROLLBACK_PATCH || REFLOW_PATCH
|
#if SCROLLBACK_PATCH
|
||||||
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1}, S_PRI },
|
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1}, S_PRI },
|
||||||
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1}, S_PRI },
|
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1}, S_PRI },
|
||||||
{ TERMMOD, XK_U, kscrollup, {.i = -1}, S_PRI },
|
{ TERMMOD, XK_U, kscrollup, {.i = -1}, S_PRI },
|
||||||
{ TERMMOD, XK_D, kscrolldown, {.i = -1}, S_PRI },
|
{ TERMMOD, XK_D, kscrolldown, {.i = -1}, S_PRI },
|
||||||
{ TERMMOD, XK_K, kscrollup, {.i = 4}, S_PRI },
|
{ TERMMOD, XK_K, kscrollup, {.i = 4}, S_PRI },
|
||||||
{ TERMMOD, XK_J, kscrolldown, {.i = 4}, S_PRI },
|
{ TERMMOD, XK_J, kscrolldown, {.i = 4}, S_PRI },
|
||||||
#endif // SCROLLBACK_PATCH || REFLOW_PATCH
|
#endif // SCROLLBACK_PATCH
|
||||||
#if CLIPBOARD_PATCH
|
#if CLIPBOARD_PATCH
|
||||||
{ TERMMOD, XK_Y, clippaste, {.i = 0} },
|
{ TERMMOD, XK_Y, clippaste, {.i = 0} },
|
||||||
{ ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
{ ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# st version
|
# st version
|
||||||
VERSION = 0.9.3
|
VERSION = 0.9.2
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
|
|
||||||
23
patch/utils.h
Normal file
23
patch/utils.h
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
/// Dynamic memory-chunk, with (1) datatype size, (2/3) initialized / allocated chunk, (4) content
|
||||||
|
typedef struct { uint8_t const elSize; uint32_t init, alloc; char* content; } DynamicArray;
|
||||||
|
#define UTF8_ARRAY {4, 0, 0, NULL}
|
||||||
|
|
||||||
|
static inline int p_alloc(DynamicArray *s, uint32_t amount) {
|
||||||
|
uint32_t const diff=s->init+s->elSize*amount-s->alloc, nas=s->alloc+max(diff,15)*s->elSize;
|
||||||
|
if (s->alloc < s->init + s->elSize * amount) {
|
||||||
|
char* tmp = realloc(s->content, nas);
|
||||||
|
if (!tmp) return 0;
|
||||||
|
s->alloc = nas, s->content = tmp;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
static inline char *view(DynamicArray * s, uint32_t i) { return s->content + i*s->elSize; }
|
||||||
|
static inline char *end(DynamicArray *s, uint32_t i) { return s->content +s->init-(i+1)*s->elSize; }
|
||||||
|
static inline uint32_t getU32(DynamicArray* s, uint32_t i, int b) { return *((uint32_t*) (b ?view(s,i) :end(s,i))); }
|
||||||
|
static char *expand(DynamicArray *s) { if (!p_alloc(s, 1)) return NULL; s->init += s->elSize; return end(s, 0); }
|
||||||
|
static inline void pop(DynamicArray* s) { s->init -= s->elSize; }
|
||||||
|
static inline void empty(DynamicArray* s) { s->init = 0; }
|
||||||
|
static inline int size(DynamicArray const * s) { return s->init / s->elSize; }
|
||||||
|
static inline void assign(DynamicArray* s, DynamicArray const *o) {
|
||||||
|
if (p_alloc(s, size(o))) memcpy(s->content, o->content, (s->init=o->init));
|
||||||
|
}
|
||||||
|
|
@ -74,5 +74,9 @@ reload_config(int sig)
|
||||||
xhints();
|
xhints();
|
||||||
|
|
||||||
XCloseDisplay(dpy);
|
XCloseDisplay(dpy);
|
||||||
|
|
||||||
|
/* from https://st.suckless.org/patches/xresources-with-reload-signal */
|
||||||
|
/* triggers re-render if we're visible */
|
||||||
|
ttywrite("\033[O", 3, 1);
|
||||||
}
|
}
|
||||||
#endif // XRESOURCES_RELOAD_PATCH
|
#endif // XRESOURCES_RELOAD_PATCH
|
||||||
|
|
|
||||||
|
|
@ -387,12 +387,6 @@
|
||||||
*/
|
*/
|
||||||
#define SELECTION_COLORS_PATCH 0
|
#define SELECTION_COLORS_PATCH 0
|
||||||
|
|
||||||
/* This patch works with selectioncolors and alpha patches to make selection
|
|
||||||
* background color transparent.
|
|
||||||
* https://st.suckless.org/patches/selectionbg-alpha/
|
|
||||||
*/
|
|
||||||
#define SELECTIONBG_ALPHA_PATCH 0
|
|
||||||
|
|
||||||
/* This is the single drawable buffer patch as outlined in the FAQ to get images
|
/* This is the single drawable buffer patch as outlined in the FAQ to get images
|
||||||
* in w3m to display. While this patch does not break the alpha patch it images
|
* in w3m to display. While this patch does not break the alpha patch it images
|
||||||
* are not shown in w3m if the alpha patch is applied.
|
* are not shown in w3m if the alpha patch is applied.
|
||||||
|
|
|
||||||
56
st.c
56
st.c
|
|
@ -1837,7 +1837,7 @@ tsetattr(const int *attr, int l)
|
||||||
term.c.attr.fg = idx;
|
term.c.attr.fg = idx;
|
||||||
#endif // MONOCHROME_PATCH
|
#endif // MONOCHROME_PATCH
|
||||||
break;
|
break;
|
||||||
case 39: /* set foreground color to default */
|
case 39:
|
||||||
term.c.attr.fg = defaultfg;
|
term.c.attr.fg = defaultfg;
|
||||||
break;
|
break;
|
||||||
case 48:
|
case 48:
|
||||||
|
|
@ -1848,7 +1848,7 @@ tsetattr(const int *attr, int l)
|
||||||
term.c.attr.bg = idx;
|
term.c.attr.bg = idx;
|
||||||
#endif // MONOCHROME_PATCH
|
#endif // MONOCHROME_PATCH
|
||||||
break;
|
break;
|
||||||
case 49: /* set background color to default */
|
case 49:
|
||||||
term.c.attr.bg = defaultbg;
|
term.c.attr.bg = defaultbg;
|
||||||
break;
|
break;
|
||||||
#if UNDERCURL_PATCH
|
#if UNDERCURL_PATCH
|
||||||
|
|
@ -1864,13 +1864,6 @@ tsetattr(const int *attr, int l)
|
||||||
term.c.attr.ucolor[2] = -1;
|
term.c.attr.ucolor[2] = -1;
|
||||||
term.c.attr.mode ^= ATTR_DIRTYUNDERLINE;
|
term.c.attr.mode ^= ATTR_DIRTYUNDERLINE;
|
||||||
break;
|
break;
|
||||||
#else
|
|
||||||
case 58:
|
|
||||||
/* This starts a sequence to change the color of
|
|
||||||
* "underline" pixels. We don't support that and
|
|
||||||
* instead eat up a following "5;n" or "2;r;g;b". */
|
|
||||||
tdefcolor(attr, &i, l);
|
|
||||||
break;
|
|
||||||
#endif // UNDERCURL_PATCH
|
#endif // UNDERCURL_PATCH
|
||||||
default:
|
default:
|
||||||
if (BETWEEN(attr[i], 30, 37)) {
|
if (BETWEEN(attr[i], 30, 37)) {
|
||||||
|
|
@ -1985,7 +1978,7 @@ tsetmode(int priv, int set, const int *args, int narg)
|
||||||
case 1006: /* 1006: extended reporting mode */
|
case 1006: /* 1006: extended reporting mode */
|
||||||
xsetmode(set, MODE_MOUSESGR);
|
xsetmode(set, MODE_MOUSESGR);
|
||||||
break;
|
break;
|
||||||
case 1034: /* 1034: enable 8-bit mode for keyboard input */
|
case 1034:
|
||||||
xsetmode(set, MODE_8BIT);
|
xsetmode(set, MODE_8BIT);
|
||||||
break;
|
break;
|
||||||
case 1049: /* swap screen & set/restore cursor as xterm */
|
case 1049: /* swap screen & set/restore cursor as xterm */
|
||||||
|
|
@ -1993,8 +1986,8 @@ tsetmode(int priv, int set, const int *args, int narg)
|
||||||
break;
|
break;
|
||||||
tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
|
tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case 47: /* swap screen buffer */
|
case 47: /* swap screen */
|
||||||
case 1047: /* swap screen buffer */
|
case 1047:
|
||||||
if (!allowaltscreen)
|
if (!allowaltscreen)
|
||||||
break;
|
break;
|
||||||
#if REFLOW_PATCH
|
#if REFLOW_PATCH
|
||||||
|
|
@ -2018,7 +2011,7 @@ tsetmode(int priv, int set, const int *args, int narg)
|
||||||
break;
|
break;
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
#endif // REFLOW_PATCH
|
#endif // REFLOW_PATCH
|
||||||
case 1048: /* save/restore cursor (like DECSC/DECRC) */
|
case 1048:
|
||||||
#if REFLOW_PATCH
|
#if REFLOW_PATCH
|
||||||
if (!allowaltscreen)
|
if (!allowaltscreen)
|
||||||
break;
|
break;
|
||||||
|
|
@ -2451,22 +2444,10 @@ csihandle(void)
|
||||||
goto unknown;
|
goto unknown;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if SYNC_PATCH || SIXEL_PATCH
|
#if SYNC_PATCH
|
||||||
case '$': /* DECRQM -- DEC Request Mode (private) */
|
case '$': /* DECRQM -- DEC Request Mode (private) */
|
||||||
if (csiescseq.mode[1] == 'p' && csiescseq.priv) {
|
if (csiescseq.mode[1] == 'p' && csiescseq.priv) {
|
||||||
switch (csiescseq.arg[0]) {
|
switch (csiescseq.arg[0]) {
|
||||||
#if SIXEL_PATCH
|
|
||||||
case 80:
|
|
||||||
/* Sixel Display Mode */
|
|
||||||
ttywrite(IS_SET(MODE_SIXEL_SDM) ? "\033[?80;1$y"
|
|
||||||
: "\033[?80;2$y", 9, 0);
|
|
||||||
break;
|
|
||||||
case 8452:
|
|
||||||
/* Sixel scrolling leaves cursor to right of graphic */
|
|
||||||
ttywrite(IS_SET(MODE_SIXEL_CUR_RT) ? "\033[?8452;1$y"
|
|
||||||
: "\033[?8452;2$y", 11, 0);
|
|
||||||
break;
|
|
||||||
#endif // SIXEL_PATCH
|
|
||||||
#if SYNC_PATCH
|
#if SYNC_PATCH
|
||||||
case 2026:
|
case 2026:
|
||||||
/* https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036 */
|
/* https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036 */
|
||||||
|
|
@ -2479,7 +2460,7 @@ csihandle(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
goto unknown;
|
goto unknown;
|
||||||
#endif // SYNC_PATCH | SIXEL_PATCH
|
#endif // SYNC_PATCH
|
||||||
case 'r': /* DECSTBM -- Set Scrolling Region */
|
case 'r': /* DECSTBM -- Set Scrolling Region */
|
||||||
if (csiescseq.priv) {
|
if (csiescseq.priv) {
|
||||||
goto unknown;
|
goto unknown;
|
||||||
|
|
@ -2668,7 +2649,7 @@ strhandle(void)
|
||||||
xsettitle(strescseq.args[1]);
|
xsettitle(strescseq.args[1]);
|
||||||
#endif // CSI_22_23_PATCH
|
#endif // CSI_22_23_PATCH
|
||||||
return;
|
return;
|
||||||
case 52: /* manipulate selection data */
|
case 52:
|
||||||
if (narg > 2 && allowwindowops) {
|
if (narg > 2 && allowwindowops) {
|
||||||
dec = base64dec(strescseq.args[2]);
|
dec = base64dec(strescseq.args[2]);
|
||||||
if (dec) {
|
if (dec) {
|
||||||
|
|
@ -2686,9 +2667,9 @@ strhandle(void)
|
||||||
#endif // OSC7_PATCH
|
#endif // OSC7_PATCH
|
||||||
case 8: /* Clear Hyperlinks */
|
case 8: /* Clear Hyperlinks */
|
||||||
return;
|
return;
|
||||||
case 10: /* set dynamic VT100 text foreground color */
|
case 10:
|
||||||
case 11: /* set dynamic VT100 text background color */
|
case 11:
|
||||||
case 12: /* set dynamic text cursor color */
|
case 12:
|
||||||
if (narg < 2)
|
if (narg < 2)
|
||||||
break;
|
break;
|
||||||
p = strescseq.args[1];
|
p = strescseq.args[1];
|
||||||
|
|
@ -2729,19 +2710,6 @@ strhandle(void)
|
||||||
tfulldirt();
|
tfulldirt();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 110: /* reset dynamic VT100 text foreground color */
|
|
||||||
case 111: /* reset dynamic VT100 text background color */
|
|
||||||
case 112: /* reset dynamic text cursor color */
|
|
||||||
if (narg != 1)
|
|
||||||
break;
|
|
||||||
if ((j = par - 110) < 0 || j >= LEN(osc_table))
|
|
||||||
break; /* shouldn't be possible */
|
|
||||||
if (xsetcolorname(osc_table[j].idx, NULL)) {
|
|
||||||
fprintf(stderr, "erresc: %s color not found\n", osc_table[j].str);
|
|
||||||
} else {
|
|
||||||
tfulldirt();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
#if OSC133_PATCH
|
#if OSC133_PATCH
|
||||||
case 133:
|
case 133:
|
||||||
if (narg < 2)
|
if (narg < 2)
|
||||||
|
|
|
||||||
17
x.c
17
x.c
|
|
@ -983,11 +983,6 @@ xloadalpha(void)
|
||||||
dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * usedAlpha);
|
dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * usedAlpha);
|
||||||
dc.col[defaultbg].pixel &= 0x00FFFFFF;
|
dc.col[defaultbg].pixel &= 0x00FFFFFF;
|
||||||
dc.col[defaultbg].pixel |= (unsigned char)(0xff * usedAlpha) << 24;
|
dc.col[defaultbg].pixel |= (unsigned char)(0xff * usedAlpha) << 24;
|
||||||
#if SELECTION_COLORS_PATCH && SELECTIONBG_ALPHA_PATCH
|
|
||||||
dc.col[selectionbg].color.alpha = (unsigned short)(0xffff * usedAlpha);
|
|
||||||
dc.col[selectionbg].pixel &= 0x00FFFFFF;
|
|
||||||
dc.col[selectionbg].pixel |= (unsigned char)(0xff * usedAlpha) << 24;
|
|
||||||
#endif // SELECTION_COLORS_PATCH && SELECTIONBG_ALPHA_PATCH
|
|
||||||
}
|
}
|
||||||
#endif // ALPHA_FOCUS_HIGHLIGHT_PATCH
|
#endif // ALPHA_FOCUS_HIGHLIGHT_PATCH
|
||||||
|
|
||||||
|
|
@ -1073,18 +1068,6 @@ xloadcols(void)
|
||||||
dc.col[defaultbg].color.red *= alpha;
|
dc.col[defaultbg].color.red *= alpha;
|
||||||
dc.col[defaultbg].color.green *= alpha;
|
dc.col[defaultbg].color.green *= alpha;
|
||||||
dc.col[defaultbg].color.blue *= alpha;
|
dc.col[defaultbg].color.blue *= alpha;
|
||||||
#if SELECTION_COLORS_PATCH && SELECTIONBG_ALPHA_PATCH
|
|
||||||
/* set alpha value of selbg color */
|
|
||||||
dc.col[selectionbg].color.alpha = (unsigned short)(0xffff * alpha);
|
|
||||||
dc.col[selectionbg].pixel &= 0x00FFFFFF;
|
|
||||||
dc.col[selectionbg].pixel |= (unsigned char)(0xff * alpha) << 24;
|
|
||||||
dc.col[selectionbg].color.red =
|
|
||||||
((unsigned short)(dc.col[selectionbg].color.red * alpha)) & 0xff00;
|
|
||||||
dc.col[selectionbg].color.green =
|
|
||||||
((unsigned short)(dc.col[selectionbg].color.green * alpha)) & 0xff00;
|
|
||||||
dc.col[selectionbg].color.blue =
|
|
||||||
((unsigned short)(dc.col[selectionbg].color.blue * alpha)) & 0xff00;
|
|
||||||
#endif // SELECTION_COLORS_PATCH && SELECTIONBG_ALPHA_PATCH
|
|
||||||
#endif // ALPHA_PATCH
|
#endif // ALPHA_PATCH
|
||||||
loaded = 1;
|
loaded = 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue