The old handling/implementation of the selection options is tohubohu, so I used the opportunity to overwork it:

1. I added the tag options -inactivebackground and -inactiveforegound, and these options are tied to widget options -inactiveselectbackground and -inactiveselectforeground.

2. For symmetry reasons I added the tag options -inactiveselectbackground and -inactiveselectforeground, these options will overrule the options -inactivebackground and -inactivebackgound of the "sel" tag, provided that the actual tag has a higher priority.

3. The manual has been updated with new options. Furthermore section "THE SELECTION" has been refined.

4. In legacy widget tag option -selectbackground is tied to widget option -selectbackground if the tag option -selectbackground is not null, otherwise the widget option is tied to tag option "-background", this is very confusing, and not conform to documentation, this binding has been changed. Now the widget option -selectbackground is tied with tag option "-background" (of the "sel" tag), this is conform to (revised and legacy) documentation, it is a clear behavior, and allows more freedom in configuration. The tag options "-selectbackground" and "-selectforeground" now will overrule the options "-background" and "-foreground" of the "sel" tag, provided that the actual tag has a higher priority.

5. I changed test case textTag-5.23 according to (3). Moreover this test case has been extended for testing all bindings. BTW: Test case text-5.24 has been removed, it was a duplicate of prior textTag-5.23.

6. Complete rework of function MakeStyle(), the "sel" tag now will be handled separately, after all other tags have been processed, this makes it easier to follow the flow.

7. The old implementation has an erroneous resource management with the shared (tied) options of the "sel" tag and the selection options of the widget. This has been replaced with a proper implementation. Unfortunately the new implementation for resource management of shared options is a bit tricky, because the option table does not support shared options.

8. DEF_TEXT_INACTIVE_SELECT_BG_COLOR has been set to NULL for Windows, this should finally fix the issue of this bug report.

These changes has been committed with [b2f64dc3].