Re: Wrapped GdkWindow* resize issues

No, I don't know how to force gdk to process resize events.

If you cc gtkmm-list in your reply, you give other subscribers a chance to answer your question. But in this case you may have better luck on one of the gtk+ lists, such as gtk-app-devel-list.


2014-03-23 02:32, Carl Nygard skrev:

Thanks for the info.  Do you know of some magic to force gdk to process resize events?  I need some way of syncing the window sizes between the actual window and the GdkWindow.


On Mon, Mar 10, 2014 at 11:15 AM, Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
I found some info at and subpages. Don't know if it's relevant.

#define gdk_window_get_size            gdk_drawable_get_size

From the description of gdk_drawable_get_size():

On the X11 platform, if drawable is a GdkWindow, the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

From the description of gdk_window_get_geometry():

On the X11 platform, the geometry is obtained from the X server, so reflects the latest position of window; this may be out-of-sync with the position of window delivered in the most-recently-processed GdkEventConfigure. gdk_window_get_position() in contrast gets the position from the most recent configure event.


2014-03-10 03:14, Carl Nygard skrev:

      // Spit out window dimensions whenever we get an event.
      for(;;) {
            XEvent e;
            Window root;
            int x, y, xret, yret;
            unsigned int widthret,heightret,borderwidthret,depthret;

            XNextEvent(dpy, &e);
            XGetGeometry(dpy, w,
                         &root, &xret, &yret,
                         &widthret, &heightret, &borderwidthret, &depthret);
            printf("Window dims: (%d, %d) pos: (%d, %d)\n",
                   widthret, heightret, xret, yret);
            // Re-initializing gdk_win doesn't even help
            gdk_win = gdk_window_foreign_new((guint32)w);
            gdk_window_get_size(gdk_win, &x, &y);
            printf("GdkWindow dims: (%d, %d)\n", x, y);

      // Wait for 10 seconds

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