Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea
wayland
Commits
4554c41b
Commit
4554c41b
authored
Dec 25, 2010
by
Kristian Høgsberg
Browse files
Only draw background if it's different from the border color
parent
940f7517
Changes
1
Hide whitespace changes
Inline
Side-by-side
clients/terminal.c
View file @
4554c41b
...
...
@@ -271,7 +271,7 @@ apply_key_map(struct keyboard_map *mode, int sym, char *response)
struct
terminal_color
{
double
r
,
g
,
b
,
a
;
};
struct
color_scheme
{
struct
terminal_color
palette
[
16
];
struct
terminal_color
borde
r
;
int
border_colo
r
;
char
default_attr
;
};
...
...
@@ -643,7 +643,7 @@ struct color_scheme DEFAULT_COLORS = {
{
0
.
33
,
1
,
1
,
1
},
/* high cyan */
{
1
,
1
,
1
,
1
}
/* white */
},
{
0
,
0
,
0
,
1
},
/* black border */
0
,
/* black border */
0x07
/* bg:black, fg:light gray */
};
...
...
@@ -657,7 +657,7 @@ terminal_draw_contents(struct terminal *terminal)
int
row
,
col
;
char
attr
;
char
toShow
[
5
]
=
{
0
,
};
int
foreground
,
background
,
bold
,
underline
,
tmp
;
int
border
,
foreground
,
background
,
bold
,
underline
,
tmp
;
int
text_x
,
text_y
;
cairo_surface_t
*
surface
;
double
d
;
...
...
@@ -669,11 +669,9 @@ terminal_draw_contents(struct terminal *terminal)
cr
=
cairo_create
(
surface
);
cairo_set_operator
(
cr
,
CAIRO_OPERATOR_SOURCE
);
cairo_set_source_rgba
(
cr
,
terminal
->
color_scheme
->
border
.
r
,
terminal
->
color_scheme
->
border
.
g
,
terminal
->
color_scheme
->
border
.
b
,
terminal
->
color_scheme
->
border
.
a
);
border
=
terminal
->
color_scheme
->
border_color
;
color
=
terminal
->
color_scheme
->
palette
[
border
];
cairo_set_source_rgba
(
cr
,
color
.
r
,
color
.
g
,
color
.
b
,
color
.
a
);
cairo_paint
(
cr
);
cairo_set_font_face
(
cr
,
terminal
->
font_normal
);
...
...
@@ -702,6 +700,9 @@ terminal_draw_contents(struct terminal *terminal)
background
=
tmp
&
~
ATTRMASK_INTENSITY
;
}
if
(
background
==
border
)
continue
;
color
=
terminal
->
color_scheme
->
palette
[
background
];
cairo_set_source_rgba
(
cr
,
color
.
r
,
color
.
g
,
color
.
b
,
color
.
a
);
cairo_move_to
(
cr
,
side_margin
+
(
col
*
extents
.
max_x_advance
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment