The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Ters on January 23, 2014, 04:13:46 PM

Title: r7038 - Untrustworthy buttons
Post by: Ters on January 23, 2014, 04:13:46 PM
The close button of at least some windows (depot, stop, vehicle) respond to mouse presses in some regions by lighting up, but does not respond to the click when the mouse button is released, except by darkening again. Other areas light up when the mouse button is pressed, and close the window when the mouse button is released. Other buttons in the titlebar respond where ever the are clicked. Some buttons trigger on the mouse down event, rather than the up event.

Furthermore, the entire button usually do not light up. This probably has something to do with the dirty rectangles.
Title: Re: r7038 - Untrustworthy buttons
Post by: TurfIt on January 28, 2014, 02:38:51 AM
I can't duplicate the close gadget not closing the window on mouse up, unless the mouse is moved off the gadget before release. The close taking action only on release over the gadget is reasonable, and should remain IMHO. All other gadgets take action on mouse down, should they all be changed to mouse up?

Some of the buttons not lighting up: next, prev, min_size, help, appears by design. Code comments say only the close and stick should, yet the goto button does too. Makes no sense to me...

Not lighting up in some windows appears due to the theme patch commenting out the code that marks the screen tiles dirty when the gui window is dirty. Absolutely no idea what this has to do with themes and was done...

Partial lighting up also appears due to the theme patch. The size of the close gadget is taken as the size of all, and used as the size to highlight. Doesn't seem right either...

The themes support still seems half baked to me - is anybody actually working to finish/fix this?
Title: Re: r7038 - Untrustworthy buttons
Post by: Ters on January 28, 2014, 05:35:54 AM
It seems to be the lowest four pixels of the close button that does not cause the window to close, which is a bit odd, because there is no corresponding problem with the help, goto and pin buttons.

Windows are not the only thing where the dirty rectangles are not working. Among other things, steam trains leave lots of tiny white specs lingering long after the rest of the smoke has disappeared.

I believe development of theme support was abandoned half-way through due to disagreements.
Title: Re: r7038 - Untrustworthy buttons
Post by: Dwachs on January 28, 2014, 08:50:10 AM
Quote from: TurfIt on January 28, 2014, 02:38:51 AM
Not lighting up in some windows appears due to the theme patch commenting out the code that marks the screen tiles dirty when the gui window is dirty. Absolutely no idea what this has to do with themes and was done...
This is from this old commit, apparently dysfunctional from the start: (r6171)
https://github.com/aburch/simutrans/commit/3a94a87cbff1b68dcea23795bc2bd808810a5e04
Title: Re: r7038 - Untrustworthy buttons
Post by: prissi on January 28, 2014, 04:28:05 PM
The goto button is not goto, but a follow button (or it is an error). As such, it will be lighted up, until the location is changed.

But in r7041 the light up should work for the first time.
Title: Re: r7038 - Untrustworthy buttons
Post by: Ters on January 28, 2014, 06:25:54 PM
Quote from: prissi on January 28, 2014, 04:28:05 PM
The goto button is not goto, but a follow button (or it is an error).

For vehicles, it is follow. For depots, stops, factories and other static things, it is go to.
Title: Re: r7038 - Untrustworthy buttons
Post by: TurfIt on January 28, 2014, 09:46:25 PM
Quote from: prissi on January 28, 2014, 04:28:05 PM
But in r7041 the light up should work for the first time.

Action rather than discussion  ;)
r7041 looks ok. I see all gadgets were changed to action on mouse release, so that answers that.

The goto/follow button still wasn't quite working consistently, I believe its fixed with r7042.



EDIT:
Quote from: Ters on January 28, 2014, 05:35:54 AM
Among other things, steam trains leave lots of tiny white specs lingering long after the rest of the smoke has disappeared.

Good lord that's horrible. It's been months since I last touched the dirty tiles, and I don't think anyone else has... How can you be the first to report, and me not even notice it. yeesh.
Title: Re: r7038 - Untrustworthy buttons
Post by: Ters on January 29, 2014, 05:51:24 AM
Quote from: TurfIt on January 28, 2014, 09:46:25 PM
Good lord that's horrible. It's been months since I last touched the dirty tiles, and I don't think anyone else has... How can you be the first to report, and me not even notice it. yeesh.

Maybe it's just some weirdness with my build, like no threading. But as far as I can see, I have no relevant changed files (only some argc and argv fix in simsys*.cc for a newer version of mingw).

Quote from: prissi on January 28, 2014, 04:28:05 PM
But in r7041 the light up should work for the first time.

The buttons behave properly as far as I can tell now (r7044). Thanks.
Title: Re: r7038 - Untrustworthy buttons
Post by: Dwachs on January 29, 2014, 07:38:18 AM
Quote from: TurfIt on January 28, 2014, 09:46:25 PM

EDIT:
Good lord that's horrible. It's been months since I last touched the dirty tiles, and I don't think anyone else has... How can you be the first to report, and me not even notice it. yeesh.
should be correct now, r7046
Title: Re: r7038 - Untrustworthy buttons
Post by: Ters on January 29, 2014, 04:00:39 PM
Yes, looks much better now. For a while, it almost looked like the ancient fountain dirty rectangle bug had been fixed as well, but that one is still around. As far as I know, it's cause is very different, so it would have been surprising.

Edit:
No, wait. Now the cursor is leaving droppings in some circumstances. The query cursor in pak64 at least does this. Reproducing is not easy, as it probably only happens when the view offset modulo something equals certain values.
Title: Re: r7038 - Untrustworthy buttons
Post by: Dwachs on January 29, 2014, 04:47:22 PM
Both, the mouse pointer as well as the pak64 fountain glitch should be fixed with r7047.
Title: Re: r7038 - Untrustworthy buttons
Post by: Ters on January 29, 2014, 06:09:23 PM
No fair. I can hardly report bugs fast enough to keep up with this rate of bug fixing.  :D
Title: Re: r7038 - Untrustworthy buttons
Post by: Yona-TYT on January 30, 2014, 12:31:04 AM
Wao if that is working quick on bug fixes... :thumbsup: