Unity sends initial GDK_CONFIGURE event with position as (0,0)

Bug #890947 reported by WenLong FENG on 2011-11-16
54
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Compiz Core
Medium
Sam Spilsbury
compiz (Ubuntu)
Undecided
Sam Spilsbury
Oneiric
Undecided
Unassigned

Bug Description

= SRU TESTCASE =

Old Behaviour:

1. Run testcase
2. Notice that it reports 2 sets of x and y values of 0,0

Fixed behaviour:

1. Run testacse
2. Notice that it reports 2 sets of x and y values which reflect the actual window position

= Problem =

After creating a top-level GTK widget, the window manager sends GDK_CONFIGURE with the position as (0,0) even though the initial position is already set to a different value.

= Environment =

* Ubuntu 11.10 (Oneiric) i386
* Unity - 4.22.0-0ubuntu3

= Impact =

This causes issues for applications that rely on this GDK_CONFIGURE to locate their app window.

= Steps to reproduce =

1. Compile gdkconfig.cpp: g++ -o gdktest gdkconfig.cpp `pkg-config --libs gtk+-2.0` `pkg-config --cflags gtk+-2.0`
2. Launch it from a terminal
3. Observe output from terminal
4. Click "OK" to launch a new window
5. Observe logs, you should see something like this:
popup window created gdkwindow -- 7063232
GDK_CONFIGURE : window -- 7063232, x -- 250, y -- 250, width -- 200, height -- 200
GDK_CONFIGURE : window -- 7063232, x -- 0, y -- 0, width -- 200, height -- 200
GDK_CONFIGURE : window -- 7063232, x -- 0, y -- 0, width -- 200, height -- 200
GDK_CONFIGURE : window -- 7063232, x -- 0, y -- 0, width -- 200, height -- 200
GDK_CONFIGURE : window -- 7063232, x -- 251, y -- 275, width -- 200, height -- 200

When running under Natty or Unity-2D, GDK_CONFIGURE is never set to 0,0.

= Original text =

when using unity 3d on ubuntu, after creating a top-level gtk widget, the window manager sends GDK_CONFIGURE with position as (0,0) although I have set the initial position to some different value.
This dose not happen on gnome/unity 2d environment. It will cause seriously issue when we rely on this event to locate our window.
Source code attached, you could compile it and launch it from terminal, the GDK_CONFIGURE event will be printed out.

Related branches

WenLong FENG (fengwl) wrote :
dobey (dobey) on 2011-11-16
affects: ubuntuone-client → unity (Ubuntu)
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
importance: Undecided → Low
Changed in unity (Ubuntu):
importance: Undecided → Low
Tom Ellis (tellis) on 2011-11-29
description: updated
Tom Ellis (tellis) on 2011-11-29
summary: - unity 3d window manager send initial GDK_CONFIGURE event with position
- as (0,0)
+ Unity sends initial GDK_CONFIGURE event with position as (0,0)
Tom Ellis (tellis) on 2011-11-29
description: updated
description: updated
Sam Spilsbury (smspillaz) wrote :
Changed in unity:
status: Confirmed → Invalid
Changed in compiz (Ubuntu):
status: New → Invalid
status: Invalid → In Progress
Changed in compiz:
importance: Undecided → Medium
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in unity:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in compiz (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in unity (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
status: Confirmed → Invalid
description: updated
Tom Ellis (tellis) wrote :

Thanks Sam!
I compiled that into a package in my ppa (ppa:tellis/generic) and tested and it fixed this bug for me.

Attaching a debdiff.

Tom Ellis (tellis) wrote :

Hi WenLong FENG,
This patch is going to go into Ubuntu 11.10 (Oneiric) as a stable release update with some other compiz patches. It will also go into 12.04 LTS.

If you want to test this one patch in the meantime, I've build a test package for Ubuntu 11.10 (Oneiric)
$ sudo apt-add-repository ppa:tellis/generic
$ sudo apt-get update
$ sudo apt-get install compiz-core

I would really appreciate your testing to confirm the fix, I have tested it and it works well for me with your test code.

Omer Akram (om26er) on 2012-01-15
no longer affects: unity (Ubuntu)
no longer affects: unity (Ubuntu Oneiric)
no longer affects: unity
affects: compiz → compiz-core
Omer Akram (om26er) on 2012-01-18
Changed in compiz (Ubuntu):
status: In Progress → Triaged
status: Triaged → Fix Committed
Changed in compiz-core:
status: New → Fix Committed
Changed in compiz-core:
milestone: none → 0.9.7

Hello WenLong, or anyone else affected,

Accepted compiz into oneiric-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in compiz (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Tom Ellis (tellis) wrote :

@Colan I don't think that's related plus the fix for this bug hasn't reached the updates repository yet so the fix can't be causing it. Unless you are suggesting it's the same bug?

Colan Schwartz (colan) wrote :

@Tom: I didn't mean to imply that the fix was causing problems; sorry if my comment came across that way. Rather, these sound similar enough that this bug may be causing the other one. So, once this fix gets released, we'll see if the other one clears up as well.

I'd really like to have the other one tracked down, or at least have some insight into it, as it's currently preventing some of us from using Ubuntu 3D (even though we have the necessary hardware). Until that one gets fixed (or at least a workaround exists), those of us affected are stuck with Ubuntu 2D. Thanks for the work all of you have been doing on these issues!

Tom Ellis (tellis) wrote :

@Colan - could you test the compiz package in the oneiric-proposed repo to see if it fixes your issue too then?
See https://wiki.ubuntu.com/Testing/EnableProposed

Colan Schwartz (colan) wrote :

With all of the latest updates in Proposed, I changed the profile from "Default" to "unity" in CompizConfig Settings Manager's Preferences section. That seemed to fix it. Thanks!

Martin Pitt (pitti) on 2012-02-06
tags: added: verification-done
removed: verification-needed
Daniel van Vugt (vanvugt) wrote :

Fix released in:
compiz (1:0.9.7.0~bzr2995-0ubuntu1) precise; urgency=low

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.6+bzr20110929-0ubuntu6.1

---------------
compiz (1:0.9.6+bzr20110929-0ubuntu6.1) oneiric-proposed; urgency=low

  * debian/patches/fix_890947_synthetic_notifications.patch:
    - Unity sends initial GDK_CONFIGURE event with position as (0,0).
      (LP: #890947)
  * debian/patches/fix_focus_on_wrong_window_896762.patch:
    - Switching viewports with ctrl-alt-(left/right/up/down) does not
      give the highest window on the target viewport focus. (LP: #896762)
  * debian/patches/java_offset_frame_extents_878934.patch:
    - Menu selection is wrong in Java apps. (LP: #878934)
 -- Omer Akram <email address hidden> Tue, 17 Jan 2012 15:08:38 -0500

Changed in compiz (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in compiz-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments