[haiku-development] Re: BWindow fShowLevel vs window_info.show_hide_level

  • From: Simon Taylor <simontaylor1@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 14 Aug 2012 08:07:03 +0100

On 13/08/2012 22:19, Ryan Leavengood wrote:
On Sun, Aug 12, 2012 at 4:23 PM, Ryan Leavengood <leavengood@xxxxxxxxx> wrote:
Back to the primary topic of this thread: I have some pending changes
which redefine fShowLevel in BWindow to match the show_hide_level in
the app_server, where 1 or more is hidden and 0 or less is shown. I
also combined the app_server message for Show and Hide to be one
message, AS_SHOW_HIDE_WINDOW, and the logic to actually show or hide
the window is now in the app_server.
[...]
Also making this change in BWindow matches how the identically named
fShowLevel in BView works. Given this I'm surprised it has been
backwards for so long ;)

I find the show_hide_level/AS_SHOW_HIDE_WINDOW naming very confusing. Additionally with your changes when fShowLevel in BWindow is positive the window is hidden? That's definitely backwards. I have no intuition about what is forward and backward when a variable name includes two completely opposite terms! Can we change the name of the one in app_server without affecting binary compatability?

While all this seems like a lot of time and effort for fairly minor
part of Haiku [...]

No need to justify it - work on whatever you want, it's all appreciated!

Simon


Other related posts: