the Fiddler's picture

GameWindow.Resize event is fired twice on Linux during startup

Project:The Open Toolkit library
Version:1.0-beta-3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:open
Description

To achieve parity with the behavior on win32, this event should fire only once. Win32 achieves this by setting the initial window size during the CREATE event. Unfortunately, it seems there is no such event on X11 (ClientNotify seems to be sent only for child windows, not the parent window itself), which means we can only set the initial size in the ConfigureNotify event (which will fire a Resize event).

Possible solutions:

  • Suppress the very first Resize event (ugly).
  • Set the initial window size blindly after XCreateWindow (will avoid the duplicate Resize event if our guess was correct).
  • Other?