Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redraw problems on Windows #15

Closed
boppreh opened this issue Jun 9, 2014 · 15 comments
Closed

Redraw problems on Windows #15

boppreh opened this issue Jun 9, 2014 · 15 comments

Comments

@boppreh
Copy link
Contributor

boppreh commented Jun 9, 2014

I'm using Windows 8.1, 64 bits, and the wakeup and test applications displays some redraw problems. Here's an example (the window is exactly as it started):

ui-redraw

The test application displayed similar problems but I couldn't capture them. It's not visible in gif above, but the borders of the text fields also flicker when resizing the window.

@andlabs
Copy link
Owner

andlabs commented Jun 9, 2014

Known issue (it's in todo.md). I have no idea what's going on: the closest thing I could come up with is MoveWindow()'s bRepaint argument doesn't actually redraw immediately, but the only reference I could find for that is some Stack Overflow answer given by the person who asked the question :S I'll probably need to start asking Microsoft people directly... maybe

@boppreh
Copy link
Contributor Author

boppreh commented Jun 9, 2014

So far I have only seen this bug when controls overlap each other, so it shouldn't be a problem in finished applications.

@andlabs
Copy link
Owner

andlabs commented Oct 11, 2014

Does this still happen on the latest version of the package? (You will need go tip if you use gcc 4.9.)

@adam-p
Copy link

adam-p commented Oct 14, 2014

Here's my example, using the widgetgallery:

redraw

The amount of overall flickering varies. In that images there isn't a lot, but often the entire view flickers while resizing. As you can see, the grid disappears and only reappears when clicked on. The set of icons at the bottom is sometimes briefly visible during resizing, but is otherwise not visible.

@andlabs
Copy link
Owner

andlabs commented Oct 15, 2014

I think redraw flicker is due to the GC. I'm not too sure; when I finish this container rearchitecture things will be somewhat simpler and I can try again.

Table hiding is a weird one; it's either a Z-order issue or something screwy in comctl6. Again, will check after the container restructure (which WILL make things easier; gives everything a straight Z-order)

@andlabs
Copy link
Owner

andlabs commented Oct 18, 2014

Does it still happen with the latest revision?

@webmaster-gostec
Copy link

I'm using Windows 7, 64 bits.
I downloaded the latest version few minutes ago and now I can't build the widgetgallery example anymore. The error message is:
.\main.go:31: undefined: ui.NewStandaloneLabel

@andlabs
Copy link
Owner

andlabs commented Oct 18, 2014

oh right; change that to NewLabel; will fix now

@webmaster-gostec
Copy link

Thanks, now I'm able to build and run the example again, but the redraw issue is still happening.

@andlabs
Copy link
Owner

andlabs commented Oct 18, 2014

Okay, this is super weird. It's definitely some wacky redraw issue that's either affecting just the Table and Area or something else entirely. Hm...

Does it still happen if the Table/Area are moved to the top of the Stack? Or does it happen to different controls in that case? (Be sure to alter the SetStretchy() indices appropriately.)

@webmaster-gostec
Copy link

I moved the Table and the Area on top of the stack and updated SetStretchy indices. Now the Area is redrawn correctly every time, but the Table has still problems: during resize i can see it flickering and when i release the mouse button sometimes is redrawn, other times it is not. Looks like the order in which the parent (the main window?) and the child (the Table) redraw changes cyclically.

Next time I'll try to swap the position of the Table and the Area and see whant happens.

@webmaster-gostec
Copy link

Just swapped the Table and the Area putting the Area on top of the stack and the Table in second position. Again, the Area redraws correctly while the table does not.

@andlabs
Copy link
Owner

andlabs commented Mar 23, 2018

Does this specific issue still occur with the current package? You'll have to rewrite the example programs, or at least recreate the UI above.

I know redraw performance is still bad, but that's a separate issue.

@boppreh
Copy link
Contributor Author

boppreh commented Mar 25, 2018

I cannot resize the window smaller than the size of the widgets inside, and thus they never overlap. It's considered fixed for me. There's also no visible flickering anymore.

Thank you!

@boppreh boppreh closed this as completed Mar 25, 2018
@andlabs
Copy link
Owner

andlabs commented Mar 25, 2018

Excellent; thanks! Redraw performance will be fixed soon, too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants