Fix color dialog crash (#228820) and xwpe terminal reset on exit

I was able to test that the bug was present, by clicking on a color cell and dragging the mouse to the right. The solution is to set the "mouse-derived selection index" in the Adjust Colors dialog. This prevents an out-of-bounds access when dragging outside of the table

There was another bug, that I fix in another patch. The symptom was the same that was happening previously when launching wpe from ther terminal. If we launch xwpe from the terminal, we save the terminal state before display init so xwpe (X11) restores the launching terminal on exit. This prevents the terminal being unusable (not needing a reset) when xwpe exits.

cc: @tille

Merge request reports

Loading