setting colors breaks cursor color

Bug #1576561 reported by Steven Noonan
This bug report is a duplicate of:  Bug #1551441: Setting cursor color doesn't persist. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sakura
New
Undecided
Unassigned

Bug Description

I noticed when playing NetHack that if I saved the color settings, it would break the highlighting of my character in-game (instead of a color-inverted @ sign, it shows a white block). See attached screenshots for example.

I found that this change fixes it:

diff --git a/src/sakura.c b/src/sakura.c
index 6e81968..bbcacb5 100644
--- a/src/sakura.c
+++ b/src/sakura.c
@@ -1113,11 +1113,11 @@ sakura_set_colors ()

        for (i = (n_pages - 1); i >= 0; i--) {
                term = sakura_get_page_term(sakura, i);
+ vte_terminal_set_color_cursor(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
                vte_terminal_set_colors(VTE_TERMINAL(term->vte),
                                        &sakura.forecolors[term->colorset],
                                        &sakura.backcolors[term->colorset],
                                        sakura.palette, PALETTE_SIZE);
- vte_terminal_set_color_cursor(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
        }

 }

Revision history for this message
Steven Noonan (steven-valvesoftware) wrote :
Revision history for this message
Steven Noonan (steven-valvesoftware) wrote :
Revision history for this message
Steven Noonan (steven-valvesoftware) wrote :
Revision history for this message
Steven Noonan (steven-valvesoftware) wrote :

Bah, that patch is bogus. If I apply that patch and then try to set a custom cursor color, it doesn't apply. I guess the previous ordering is correct (and should be fixed in the other place that vte_terminal_set_colors is called after vte_terminal_set_color_cursor). But there's still the matter of getting the cursor inversion to behave. I know that xfce4-terminal seems to behave at least...

Revision history for this message
David Gómez (dabisu) wrote :

Hello Steve, could you please check if the bug is it now fixed with latest revision code?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.