Opened 4 years ago

Closed 2 years ago

#46 closed defect (fixed)

if clicked on not existent bockmark grafical display errors occur

Reported by: HoraK-FDF Owned by: Thomas Bernard
Priority: major Milestone: 2.5
Component: GrafX2 Version: 2.5
Keywords: Cc:

Description

Hi,

here is how to reproduce the bug,

set an directory in the ini that not exist or set en existing directory and then delete it. Now press the bookmark button and it very often happens that the mouse cursor causes grafical errors i don't know maybe the save/load menu don't gets redrawn after the red flash. I attach a picture that shows the bug. Then there is also another part of the bug or its a standalone thing when clicked on an non existing bookmark and then fast on the file name edit bar it locks itself up in palette depending colors of the flash, for that i will also attach a pic.

Attachments (2)

gx2_bookmarks_bug.png (26.9 KB) - added by HoraK-FDF 4 years ago.
click on missing bookmark cursor bug
gx2_bookmarks_bug_flash.png (29.0 KB) - added by HoraK-FDF 4 years ago.
click on missing bookmark stuck in the flash bug

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by HoraK-FDF

Attachment: gx2_bookmarks_bug.png added

click on missing bookmark cursor bug

Changed 4 years ago by HoraK-FDF

Attachment: gx2_bookmarks_bug_flash.png added

click on missing bookmark stuck in the flash bug

comment:1 Changed 4 years ago by HoraK-FDF

from the second stuck in the flash thing it only happens if it was clicked on a picture before and the stuck color disappears if clicked somewhere outside the file name edit bar, the bug can then go another step if after clicking on an picture it is clicked on a directory or "PARENT DIRECTORY" (only clicked on it and directory entered do the same) then the stuck color also remains if clicked outside the file name edit bar the only thing to get the right color back is to click on a picture or leave the save/load menu.

comment:2 Changed 2 years ago by Thomas Bernard

I don't reproduce with the latest sources.
I've got a red flash when clicking on the boggus directory bookmark.

I'm under FreeBSD, but code doesn't seems to be very system dependent (chdir either fails or succeed)

comment:3 Changed 2 years ago by Thomas Bernard

I reproduced when moving the mouse fast during the red flash.
It looks like a bug in the "red flash" function.

comment:4 Changed 2 years ago by PulkoMandy

It's possible that the red flash code does not handle a visible mouse cursor. Originally it was designed for save/load where the cursor is hidden.

comment:5 Changed 2 years ago by Thomas Bernard

Calling Error(0) with the cursor hidden causes the problem.
Adding Display_cursor(); just before and Hide_cursor(); just after fixes the issue

diff --git a/src/filesel.c b/src/filesel.c
index b0469df..b9f7a19 100644
--- a/src/filesel.c
+++ b/src/filesel.c
@@ -2090,7 +2090,11 @@ byte Button_Load_or_Save(T_Selector_settings *settings, byte load, T_IO_Context
           Highlight_file(Find_file_in_fileselector(&Filelist, previous_directory));
         }
         else
+        {
+          Display_cursor();
           Error(0);
+          Hide_cursor();
+        }
         // Affichage des premiers fichiers visibles:
         Prepare_and_display_filelist(Selector->Position,Selector->Offset,file_scroller);
         Display_cursor();

comment:6 Changed 2 years ago by Thomas Bernard

Or else we could modify Error(0) so it doesn't call Delay_with_active_mouse()
but directly SDL_Delay()

comment:7 Changed 2 years ago by PulkoMandy

I prefer the first solution, there is no need to freeze the mouse cursor during the red flash then.

comment:8 Changed 2 years ago by Thomas Bernard

So I reproduced and understood the 2nd issue as well.

https://gitlab.com/GrafX2/grafX2/merge_requests/16

comment:9 Changed 2 years ago by Thomas Bernard

Owner: changed from pulkomandy to Thomas Bernard
Status: newaccepted

comment:10 Changed 2 years ago by Thomas Bernard

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.