After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 432552 - Resizing a nautlius window casues _NET_WM_MOVERESIZE window manager warnings
Resizing a nautlius window casues _NET_WM_MOVERESIZE window manager warnings
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.28.x
Other Linux
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 433262 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-04-23 10:22 UTC by Sebastien Bacher
Modified: 2011-11-07 21:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Small patch against metacity to remove the message (748 bytes, patch)
2009-08-02 10:25 UTC, Marcus Carlson
committed Details | Review

Description Sebastien Bacher 2007-04-23 10:22:41 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/109156

"Binary package hint: nautilus

Description of the problem:
Every time a nautilus window is resized a window manager warning is logged in ~/.xsession-errors .

Steps to reproduce:
1. Start a gnome-terminal .
2. Type tail -f ~/.xsession-errors .
3. Go to Places -> Desktop.
3. Go to the bottom right hand corner of the "(Desktop - File Browser)" window and click on the grippy.

Expected result:
No extra messages to appear in ~/.xsession-errors .

Actual result:
Output like the following is added:
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0xc05286 (Desktop - ); these messages lack timestamps and therefore suck.

How reproducible is this problem?
The problem is reproducible every time.

Version information:
Ubuntu Feisty
nautilus 2.18.1-0ubuntu1"
Comment 1 Sitsofe Wheeler 2007-08-31 16:58:44 UTC
Still here in Ubuntu Gutsy.

Version information:
Ubuntu Gutsy (development branch)
nautilus 1:2.19.91-0ubuntu1
Comment 2 Sitsofe Wheeler 2008-04-16 11:52:15 UTC
Still here in Ubuntu Hardy.

Version information:
Ubuntu 8.04
nautilus 1:2.22.2-0ubuntu3
Comment 3 Cosimo Cecchi 2008-04-16 12:06:45 UTC
Confirming and updating fields.
Comment 4 Marcus Carlson 2009-08-02 10:14:38 UTC
OK, I've done some investigation around this and this is what I found.

The problem has nothing to do with nautilus as other has confirmed but in the WM spec. The thing is that _NET_WM_MOVERESIZE does not have a timestamp data post, see [1]. Gtk on the other hand sends the timestamp all the way from the grip to the function that sends the moveresize message. But when we send the message the timestamp is of course not used as it's not part of the spec;

From gtk (gdkwindow-x11.c:4741)

static void
wmspec_moveresize (GdkWindow *window,
                   gint       direction,
                   gint       root_x,
                   gint       root_y,
                   guint32    timestamp)     
{
  GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
  
  XClientMessageEvent xclient;

  /* Release passive grab */
  gdk_display_pointer_ungrab (display, timestamp);

  memset (&xclient, 0, sizeof (xclient));
  xclient.type = ClientMessage;
  xclient.window = GDK_WINDOW_XID (window);
  xclient.message_type =
    gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_MOVERESIZE");
  xclient.format = 32;
  xclient.data.l[0] = root_x;
  xclient.data.l[1] = root_y;
  xclient.data.l[2] = direction;
  xclient.data.l[3] = 0;
  xclient.data.l[4] = 0;
  
  XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,
	      SubstructureRedirectMask | SubstructureNotifyMask,
	      (XEvent *)&xclient);
}

In metacity for every _NET_WM_MOVERESIZE we warn about this.

From metacity (window.c:5046)

      x_root = event->xclient.data.l[0];
      y_root = event->xclient.data.l[1];
      action = event->xclient.data.l[2];
      button = event->xclient.data.l[3];

      /* FIXME: What a braindead protocol; no timestamp?!? */
      timestamp = meta_display_get_current_time_roundtrip (display);
      meta_warning ("Received a _NET_WM_MOVERESIZE message for %s; these "
                    "messages lack timestamps and therefore suck.\n",
                    window->desc);

So, what to do? Either file a bug against the specification (and change all implementations) or just omit the message from metacity as it seems completely useless and just clutter the xsession log.

[1] http://standards.freedesktop.org/wm-spec/1.4/ar01s04.html
Comment 5 Marcus Carlson 2009-08-02 10:25:56 UTC
Created attachment 139724 [details] [review]
Small patch against metacity to remove the message
Comment 6 Cosimo Cecchi 2009-10-07 15:27:07 UTC
-> metacity

Reassigning then.
Comment 7 Sitsofe Wheeler 2010-05-24 14:04:09 UTC
Still here in Ubuntu Lucid.

Version information:
Ubuntu 10.04 LTS
metacity 1:2.30.1-0ubuntu1
Comment 8 Cédric Bellegarde 2010-12-15 11:53:10 UTC
Still here...
Comment 9 Thomas Thurman 2011-01-22 20:52:41 UTC
Review of attachment 139724 [details] [review]:

Seems pretty reasonable. Checking this into master.
Comment 10 Thomas Thurman 2011-01-22 20:56:49 UTC
-> FIXED
Comment 11 C de-Avillez 2011-11-07 21:57:06 UTC
*** Bug 433262 has been marked as a duplicate of this bug. ***