[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting real size and position for arranged controls.
[Thread Prev] | [Thread Next]
- Subject: Re: Getting real size and position for arranged controls.
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Mon, 27 Jan 2025 00:26:16 +0000
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Sun, 26 Jan 2025, 16:00 Benoît Minisini, < benoit.minisini@xxxxxxxxxxxxxxxx> wrote: > Le 26/01/2025 à 16:19, Bruce Steers a écrit : > > > > Glad you figured it out Carlos :) > > > > I'll try to explain the wayland issue for anyone who's interested as > > it's a rainy Sunday and I'm bored..... > > The way to get your head around wayland is to think your application > > window now opens in it's very own personal screen. > > The compositor gives your program a space the size of your window. > > > > Unlike in X11 where your window is a smaller rectangle inside a larger > > screen rectangle and the windows X and Y position can be moved to any > > point inside the larger screen. Also Form.Move() works as expected. > > > > With Wayland your window is kind of fullscreen in it's own screen space. > > From the gambas programs view the screen is the size of your window and > > the windows X and Y position is always 0, 0 (ish) > > So GianLuigi is correct that there are wayland issues but i think they > > are not really relevant to this suggested type of usage. > > it's not quite as bad as "any code based on window position cannot work > > in wayland" > > In reality it ONLY negates code that wants to *move* the main window > > inside the screen. that is not possible with wayland as explained. > > > > But for most code working "inside" the application area, for example... > > ' find an objects position in the form using Form.ScreenX and > > Control.ScreenX values... > > Dim iXPos As Integer = hControl.ScreenX - hControl.Window.ScreenX > > > > There is no real difference in the outcome. > > "for the most part" usage of ScreenX/ScreenY values work just as well > > with wayland as X11, the difference/offset is handled internally. > > > > Only when it comes to top-level window movement or reading top-level > > window positions () will you find Form.ScreenX/.ScreenY properties not > > making sense in wayland as the "screen" as we know it is not the same. > > > > Otherwise it's probably code that will still work as expected :) > > > > I hope that made sense :) > > > > Respects > > BruceS > > > > It's a rather good presentation of the problem with windows coordinates > in Wayland. I think there should be a Wayland page on the wiki with that > kind of information. > > -- > Benoît Minisini. > I did add some info a while ago in the F.A.Q <http://F.AQ> on wiki. https://gambaswiki.org/wiki/doc/faq#t13 But yes a full page dedicated to all the differences with wayland in detail would be good. I'll start something, Where would you suggest to put the link to the page? Respects BruceS
| Re: Getting real size and position for arranged controls. | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
| Getting real size and position for arranged controls. | Carlos Prieto <caprilo@xxxxxxxx> |
| Re: Getting real size and position for arranged controls. | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
| Re: Getting real size and position for arranged controls. | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: Getting real size and position for arranged controls. | Carlos Prieto López <caprilo@xxxxxxxx> |
| Re: Getting real size and position for arranged controls. | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: Getting real size and position for arranged controls. | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
| Re: Getting real size and position for arranged controls. | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: Getting real size and position for arranged controls. | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |