lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.28k stars 161 forks source link

add options to set cursor type and color #135

Closed pik closed 9 years ago

pik commented 9 years ago

133 #99

I based this on Vaygr's patch, added a drop-down toggle for cursor type, and switched from color to rgba values. Also I skipped over the anti-aliasing changes on account of https://github.com/lanoxx/tilda/issues/127.

One thing I'm curious about are the status sanity checks: https://github.com/pik/tilda/blob/bddc5679c2bf42b17719135e474c7052f76f0ac9/src/wizard.c#L932. I added a default correction in the switch https://github.com/pik/tilda/blob/bddc5679c2bf42b17719135e474c7052f76f0ac9/src/wizard.c#L912 - but I don't really follow how can a drop-down toggle mess this up? Are those just artifacts from older code?

lanoxx commented 9 years ago

You mean this check:

if (status < 0 || status > 1) {
    ...

This is just to ensure that the values of the drop-down are within range (between 0 and 1 inclusive). But that is totally unrelated with the Cursor shape.

pik commented 9 years ago

Yes I meant that I included a check to coarse invalid cursor_shape values (status < 0 || status > 2) for consistency across code but I'm not sure when it would ever be triggered unless there was a regression elsewhere.

lanoxx commented 9 years ago

Yes this is only for regression detection.