Hi All,
I'm moving apps which I made work under windows with mingw + allegro 4.4.1.1 and last included dirextX to linux, I set up the same allegro version and use the current build-essential under my favorite distro.
the first thing deals with the mouse behavior
My first remark is the mouse cursor in windows disappear as soon as I'm moving into the allegro window, that leads me to create my own sprite to see what I'm doing inside. This is different under linux as far as the system cursor stays all the time with or without my own sprite. As result I remove my sprite.
Is it normal ? be honest with all what I could read I never noticed something about that.
My second remark is the directX driver under windows is less strict that x11 one, I leave some old acquire_screen that I did not see , and it did not let me any chance
because it provokes some deadlocks. Unlike the first remark I read a lot about that, so i paid a lot of attention to remove all acquire_screen, and manage the show_mouse()correctly;
the last thing is I have some refresh issue with the mouse sprite, if I click somewhere and I do not move, all is ok when the mouse.c driver update mouse he what was behind the mouse sprite at the same place but if I move the mouse there is an offset and make the screen dirty what was not the case under windows.
I draw all directly to the screen so I suspect conflict with mouse and sprite to access to screen.
I started to use buffer and do a better refresh loop but when I put on something I want it refresh strait away
let me know about your experience on linux to lead me to make better thing
I would appreciate help about that
here my code to allow you to understand
let me know
Matt
On Linux, you should normally just let the OS draw the cursor for you. To do that, call enable_hardware_cursor() before show_mouse(). You then never need to worry about hiding the mouse when you draw to the screen again.
Hi,
thanks a lot for your help 
it did not change a lot aspect be honest
but after I have a crazy slowness I passed 4 hours on it just for a vsync()
and windows just did not pay attention to that !!!!
crazy
I remove all acquire_screen so it seems no more dead_lock that good.
I all most finished the transition now, but it stays all last issue with the mouse sprite. Actually the cursor is behind the hardware cursor, and when I click the button pushed is blit but when I release it I blit the release button but when I move the mouse (I think this is the update function in mouse.c) blit the old button part behind the mouse before move and it makes me a little square in the middle with the part of old picture.
this is really dirty, I worked with a background I print and after I start loop
do you have any idea why I could have it under linux but not under windows ?
let me know
Matt
Actually the cursor is behind the hardware cursor, and when I click the button pushed is blit but when I release it I blit the release button but when I move the mouse (I think this is the update function in mouse.c) blit the old button part behind the mouse before move and it makes me a little square in the middle with the part of old picture.
Don't draw your own mouse cursor.
Set a hardware cursor in Allegro and use set_mouse_sprite() to let the OS draw the cursor for you.
If you are drawing your own cursor (or use Allegro's software cursor), make sure you hide/scare the cursor before drawing to that region of the screen.
do you have any idea why I could have it under linux but not under windows ?
WIndows may use a hardware cursor by default in windowed mode.
You can tell which of the two is being used because Allegro's software cursor is clipped to the edge of the window whereas the OS hardware cursor is not.
Don't draw your own mouse cursor.
IMO, drawing your own cursor is actually a viable choice if you do it right. Assuming you have a proper frame buffering scheme in place already (double buffer or whatever), it's as easy as drawing the sprite of your choice onto the back buffer, at the current mouse position, as part of your drawing routine. There are only two downsides as opposed to a OS-handled mouse cursor: your own mouse cursor will remain visible when the mouse leaves your window (which is only an issue in windowed mode), and when your frame rate goes down, mouse movement gets as choppy as the rest of your game.
OTOH, you can use practically any sprite you like, including wildly animated ones, and depending on the capabilities of your graphics engine, you can add all sorts of effects - shadows, lighting, transparency, particles, you name it.
OTOH, you can use practically any sprite you like, including wildly animated ones, and depending on the capabilities of your graphics engine, you can add all sorts of effects - shadows, lighting, transparency, particles, you name it.
Indeed.
IMO, drawing your own cursor is actually a viable choice if you do it right
Yes. If.
With a proper drawing infrastructure in place, doing it yourself is easy and fairly fool-proof. The hardware cursor approach is also quite easy, but everything in between (the methods that require scare_mouse() or such) I would not recommend.
Thanks a lot,
finally I choose to use the hardware cursor, I remove all show_mouse() and to avoid the issue with blitting I used scare and unscare on function where I had issue.
the only thing stays is I would like potentially remove the hardware cursor in Allegro window
any idea 
I would appreciate help 
let me know thanks a lot
finally I choose to use the hardware cursor, I remove all show_mouse() and to avoid the issue with blitting I used scare and unscare on function where I had issue.
the only thing stays is I would like potentially remove the hardware cursor in Allegro window
I think you got things mixed up somewhere, because that doesn't make sense to me.
A hardware cursor, in Allegro-speak, is a custom cursor (ie, with a bitmap that you provide) that is drawn by the OS. Not by you or by Allegro. Because the OS draws it, you don't have to worry about mouse tails or anything like that, you never need to hide or scare the mouse. Things generally just work.
You can call set_mouse_sprite()/show_mouse() and never worry about a thing afterwards.
If you're never calling show_mouse(), then you don't need scare/unscare_mouse(), because there is no mouse cursor.
The standard system mouse cursor, in Allegro-speak, is called a system or OS cursor. This is never visible if you use a hardware cursor, because when you set a "hardware cursor" you're changing the system mouse cursor.
It doesn't look like this is what you did from your message, but I can't work out what it is that you did do. Can you clarify?
Post code if you have to.
Hi,
I made some test and better understood what you mean 
I declare nothing except install mouse driver and it use the hardware cursor because all work without scare and unscare so it seems that just declare the install_mouse and enable_hardware_.. and that is all after all is ok
will go on to make some test
will let you know thanks a lot
Matt