Subject: bug#25851: 25.2; GTK warning when starting Emacs when desktop file has more than one frame

From: martin rudalics <[email-masked]>
Date: Fri, 03 Mar 2017 09:13:08 +0100

> If we removed the arguably illegitimate chicanery, what
 > functionality, specifically, would be lost? Might it be achieved
 > in a more straightforward way?

That's a good summary of the problem.  Try to use the following
definition of xg_set_geometry:

static void
xg_set_geometry (struct frame *f)
{
   gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
		   f->left_pos, f->top_pos);
}

I suppose it might break things like starting with a specified geometry
and a maximized frame and trying to demaximize the frame afterwards.  It
might as well work.

The greatest problem in this area is always to find a solution that fits
(almost) all window managers and user preferences.

martin