Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » al_get_window_position

Credits go to Peter Wang for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2 
al_get_window_position
Matthew Leverton
Supreme Loser
January 1999
avatar

the al_get_backbuffer function or one like it would have to take a ALLEGRO_DISPLAY arg.

That implies you know what the current display is.

Thomas Fjellstrom
Member #476
June 2000
avatar

That implies you know what the current display is.

No it implies you know which one you want to set the current backbuffer to. In the new changes there is no current display. Just a current target bitmap.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Wang
Member #23
April 2000

Call al_set_target_backbuffer(display); where display is a handle you kept around.

al_get_current_display() might remain after all, but only because in A5 rendering contexts and windows are tied together into ALLEGRO_DISPLAY, and users might need to know what rendering context they are in.

Matthew Leverton
Supreme Loser
January 1999
avatar

Call al_set_target_backbuffer(display); where display is a handle you kept around.

I don't have a display handle because it's a library, not user code.

If the answer is "update the library to make the user send explicit display parameters," then so be it. I'm trying to future proof the code while I fix the breaks related to the recent changes.

Peter Wang
Member #23
April 2000

In regards to your other question, the problem is due to xdisplay.c:783. I don't know why that condition is there but it's unnecessary with my window manager (xfwm).

Matthew Leverton
Supreme Loser
January 1999
avatar

Removing the check fixes default Ubuntu+Compiz.

 1   2 


Go to: