Re: How does one get the screen coordinates of the workspace?



I use gtkmm and get screen size before opening the application window in order to make sure it fits on the display. the equivalent gtk/gdk calls (I think) .... use gtk_window_get_screen() to get the gdk window from the gtk window. Then from the gdk window I use gdk_window_get_height() to get the height, and then gtk_window_resize() to resize the original gtk window to fit.

It has been a while since I looked at the code... but I think that was it.

jim...

On 15-12-29 02:26 PM, Rick Berger wrote:
I'm looking for to get the screen coordinates, height and width of the workspace on Ubuntu's desktop. The only way I see to doing this, is in starting the app: maximize its window; get the workspace info from its window's coordinates and dimensions; then un-maximize its window. I believe these can be done with GDK.

Is there better way to do this?

Rick
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]