OsWindow tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OsWindow tests

Eric Le Pors
Hello,

I try to execute OsWindow examples with Pharo 5 VM and Pharo-50761 or Pharo-60251 images on Windows 7

Every time you open a SDL window, interact with Pharo main window is no longer possible...

When i execute :
SDL2AthensDrawingExample new open

a "New window" is openned and you can draw something in the window, but... the window does not close and the pharo main window is not clickable (however some incorrect keystrokes events are transmitted to the pharo main window)

When i use the same images on Linux... no bug.
Is there a solution to this issue on Microsoft Windows ?

Thank you in advance,
Eric
Reply | Threaded
Open this post in threaded view
|

Re: OsWindow tests

Ronie Salgado
Hello Eric,

I am checking some problems with OSWindow in windows, and this is a problem with the SDL2DisplayPlugin in Windows. Until we fix the VM plugin in Windows, the current workaround is to just disable the plugin in Windows. For disabling this plugin, you have to the change the following method to always return false (by removing the primitive):

OSSDL2Driver class >> hasPlugin
    ^ false

When the plugin is not available, the OSWindow SDL2 driver will spawn a Pharo process for polling the SDL2 queue. The plugin installs a hooks in the VM heartbeat place, which checks if there are available SDL2 events. If there are, it signals a Pharo semaphore to wake up a Pharo process the consumes all of the events avaiable in the queue.

Best regards,
Ronie

2016-10-04 13:18 GMT-03:00 Eric Le Pors <[hidden email]>:
Hello,

I try to execute OsWindow examples with Pharo 5 VM and Pharo-50761 or
Pharo-60251 images on Windows 7

Every time you open a SDL window, interact with Pharo main window is no
longer possible...

When i execute :
SDL2AthensDrawingExample new open

a "New window" is openned and you can draw something in the window, but...
the window does not close and the pharo main window is not clickable
(however some incorrect keystrokes events are transmitted to the pharo main
window)

When i use the same images on Linux... no bug.
Is there a solution to this issue on Microsoft Windows ?

Thank you in advance,
Eric



--
View this message in context: http://forum.world.st/OsWindow-tests-tp4918041.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: OsWindow tests

Eric Le Pors
Hello Ronie,

Thank you ! Events are "back" in the main Pharo Window !

But now, when i open and close brick window examples, a debugger opens because BlOsWindow try to call  destroy method on OSSDL2Windowhandle.

But OSSDL2Driver class >> current  returns an instance of OSNullWindowDriver and this class does not have unregisterWindowWithId: method.
this method is in OSSDL2Driver

In order to be able to close SDL window i added a temporary fix :

OSNullWindowDriver >> unregisterWindowWithId:
    OSWindowDriver current unregisterWindowWithId: windowId.

It is not a good and long term solution... i know !

The VM is also unstable after openning SDL window...

Thank you for you help. Can i help to solve OsWindow/SDL2 problems ?

Eric.