Hi; On 4 January 2016 at 23:25, rastersoft <ras...@rastersoft.com> wrote: > Hi all: > > I want to place a window at the bottom-left part of the screen. The > first idea is to get the screen resolution and substract the window > size; unfortunately, desktops can have taskbars, so the desktop size is > always smaller than the physical resolution. > > How can I do that? How can I get the desktop size, after removing the > space used by taskbars?
This function may be what you want: https://developer.gnome.org/gdk3/stable/GdkScreen.html#gdk-screen-get-monitor-workarea As it gives the usable work area, as provided by the current window manager. You can combine that information with the monitor's geometry to get an idea of how the displays are sized and physically laid out, and what kind of available space you have. On the other hand, you have to realize that absolute positioning of windows is not something that is supported (or supportable) in every windowing system; for instance, on X11 the window manager has the final say on where a client window is going to be positioned, and there is nothing that a toolkit nor an app developer can do to change that. In Wayland, instead, absolute positioning of windows relative to screen coordinates is impossible by design, as it has to include things like output and input transformations, as well as ensuring that applications are self-contained and cannot inspect the contents and geometry of the windows on the display. The only component that can reliably position windows in specific locations is the window manager/compositor/display server. Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list