You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2017/05/27 01:11:50 UTC
[1/3] incubator-guacamole-server git commit: GUACAMOLE-280: Add
support for faint (low) intensity SGR.
Repository: incubator-guacamole-server
Updated Branches:
refs/heads/master 6d2cfdabf -> 9ee224f2c
GUACAMOLE-280: Add support for faint (low) intensity SGR.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/2146200d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/2146200d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/2146200d
Branch: refs/heads/master
Commit: 2146200dfde612029303787d40d1f53581d77a37
Parents: 6d2cfda
Author: Michael Jumper <mj...@apache.org>
Authored: Sun May 21 13:34:30 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sun May 21 13:46:21 2017 -0700
----------------------------------------------------------------------
src/terminal/display.c | 7 +++++++
src/terminal/terminal.c | 11 ++++++-----
src/terminal/terminal/types.h | 6 ++++++
src/terminal/terminal_handlers.c | 8 +++++++-
4 files changed, 26 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/2146200d/src/terminal/display.c
----------------------------------------------------------------------
diff --git a/src/terminal/display.c b/src/terminal/display.c
index cd9f6a6..a1f37b3 100644
--- a/src/terminal/display.c
+++ b/src/terminal/display.c
@@ -128,6 +128,13 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
display->glyph_foreground = *foreground;
display->glyph_background = *background;
+ /* Modify color if half-bright (low intensity) */
+ if (attributes->half_bright) {
+ display->glyph_foreground.red /= 2;
+ display->glyph_foreground.green /= 2;
+ display->glyph_foreground.blue /= 2;
+ }
+
return 0;
}
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/2146200d/src/terminal/terminal.c
----------------------------------------------------------------------
diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c
index 711a0fa..bba95f0 100644
--- a/src/terminal/terminal.c
+++ b/src/terminal/terminal.c
@@ -296,11 +296,12 @@ guac_terminal* guac_terminal_create(guac_client* client,
guac_terminal_char default_char = {
.value = 0,
.attributes = {
- .foreground = guac_terminal_palette[default_foreground],
- .background = guac_terminal_palette[default_background],
- .bold = false,
- .reverse = false,
- .underscore = false
+ .foreground = guac_terminal_palette[default_foreground],
+ .background = guac_terminal_palette[default_background],
+ .bold = false,
+ .half_bright = false,
+ .reverse = false,
+ .underscore = false
},
.width = 1
};
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/2146200d/src/terminal/terminal/types.h
----------------------------------------------------------------------
diff --git a/src/terminal/terminal/types.h b/src/terminal/terminal/types.h
index 7d3cd53..0d054f8 100644
--- a/src/terminal/terminal/types.h
+++ b/src/terminal/terminal/types.h
@@ -47,6 +47,12 @@ typedef struct guac_terminal_attributes {
bool bold;
/**
+ * Whether the character should be rendered with half brightness (faint
+ * or low intensity).
+ */
+ bool half_bright;
+
+ /**
* Whether the character should be rendered with reversed colors
* (background becomes foreground and vice-versa).
*/
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/2146200d/src/terminal/terminal_handlers.c
----------------------------------------------------------------------
diff --git a/src/terminal/terminal_handlers.c b/src/terminal/terminal_handlers.c
index 55fd682..e0be18f 100644
--- a/src/terminal/terminal_handlers.c
+++ b/src/terminal/terminal_handlers.c
@@ -897,6 +897,10 @@ int guac_terminal_csi(guac_terminal* term, unsigned char c) {
else if (value == 1)
term->current_attributes.bold = true;
+ /* Faint (low intensity) */
+ else if (value == 2)
+ term->current_attributes.half_bright = true;
+
/* Underscore on */
else if (value == 4)
term->current_attributes.underscore = true;
@@ -906,8 +910,10 @@ int guac_terminal_csi(guac_terminal* term, unsigned char c) {
term->current_attributes.reverse = true;
/* Normal intensity (not bold) */
- else if (value == 21 || value == 22)
+ else if (value == 21 || value == 22) {
term->current_attributes.bold = false;
+ term->current_attributes.half_bright = false;
+ }
/* Reset underscore */
else if (value == 24)
[2/3] incubator-guacamole-server git commit: GUACAMOLE-280: Ensure
bold and half-bright attributes cancel each other out.
Posted by jm...@apache.org.
GUACAMOLE-280: Ensure bold and half-bright attributes cancel each other out.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/9da27ad5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/9da27ad5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/9da27ad5
Branch: refs/heads/master
Commit: 9da27ad5785093d18bbe85f65c3a96e26ee21816
Parents: 2146200
Author: Michael Jumper <mj...@apache.org>
Authored: Sun May 21 13:48:10 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sun May 21 13:48:10 2017 -0700
----------------------------------------------------------------------
src/terminal/display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/9da27ad5/src/terminal/display.c
----------------------------------------------------------------------
diff --git a/src/terminal/display.c b/src/terminal/display.c
index a1f37b3..de2cae5 100644
--- a/src/terminal/display.c
+++ b/src/terminal/display.c
@@ -118,7 +118,7 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
}
/* Handle bold */
- if (attributes->bold
+ if (attributes->bold && !attributes->half_bright
&& foreground->palette_index >= GUAC_TERMINAL_FIRST_DARK
&& foreground->palette_index <= GUAC_TERMINAL_LAST_DARK) {
foreground = &guac_terminal_palette[foreground->palette_index
@@ -129,7 +129,7 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
display->glyph_background = *background;
/* Modify color if half-bright (low intensity) */
- if (attributes->half_bright) {
+ if (attributes->half_bright && !attributes->bold) {
display->glyph_foreground.red /= 2;
display->glyph_foreground.green /= 2;
display->glyph_foreground.blue /= 2;
[3/3] incubator-guacamole-server git commit: GUACAMOLE-280: Merge low
intensity SGR option.
Posted by jm...@apache.org.
GUACAMOLE-280: Merge low intensity SGR option.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/9ee224f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/9ee224f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/9ee224f2
Branch: refs/heads/master
Commit: 9ee224f2ca3a57bb8212574f78171cfc76196adf
Parents: 6d2cfda 9da27ad
Author: James Muehlner <ja...@guac-dev.org>
Authored: Fri May 26 18:11:06 2017 -0700
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Fri May 26 18:11:06 2017 -0700
----------------------------------------------------------------------
src/terminal/display.c | 9 ++++++++-
src/terminal/terminal.c | 11 ++++++-----
src/terminal/terminal/types.h | 6 ++++++
src/terminal/terminal_handlers.c | 8 +++++++-
4 files changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------