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 324148 - Gedit opened inside Nautilus: New window is not on top
Gedit opened inside Nautilus: New window is not on top
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: 2.14.0
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-15 08:11 UTC by Jochen Baier
Modified: 2007-07-01 10:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.62 KB, patch)
2005-12-15 09:30 UTC, Paolo Borelli
committed Details | Review

Description Jochen Baier 2005-12-15 08:11:29 UTC
If I open some text file with gedit inside Nautilus or Konqueror. (propably more
situations have the same problem), the new window is behind the Nautilus window

i got following error:

(gedit:5238): Gdk-CRITICAL **: gdk_x11_window_set_user_time: assertion `GDK_IS_W
INDOW (window)' failed


only happens if gedit have an other window open on other desktop


steps:

1. open gedit on desktop x
2. open gedit inside nautilus on desktop !=x
3. repeat step 2 until the window is behind nautilus
Comment 1 Paolo Borelli 2005-12-15 09:20:55 UTC
Uh oh, you are right. It happens (as the warning suggest) because the window
isn't realized yet since it has never been shown, so the corresponding GdkWindow
has not been created yet and setting the user time fails. Not managing to set
the user time means that nautilus keeps having a maore up to date interaction
timestamp and thus it stays on top.

Patch coming up in a minute. It's a bit of a hack (it forces a realize() before
setting the timestamp) but I don't see any better way to solve it. Also the
newly introduced gtk_window_present_with_time doesn't help since in the case of
a window that has never been shown it simply falls back to widget_show() and
doesn't set the timestamp :(
Comment 2 Paolo Borelli 2005-12-15 09:30:19 UTC
Created attachment 56016 [details] [review]
patch
Comment 3 Jochen Baier 2005-12-15 10:48:59 UTC
about every tenth time it is still below ;(
Comment 4 Paolo Maggi 2005-12-29 12:02:37 UTC
The patch looks good to me and fixes an obvious problem. Please, commit. 

We will investigate later why the patch does not completely fix the Jochen's problem.
Comment 5 Paolo Borelli 2007-06-26 12:20:33 UTC
does thi still happen? Can't reproduce here...
Comment 6 Jochen Baier 2007-07-01 10:45:36 UTC
does not happen anymore thanks.
Comment 7 Paolo Borelli 2007-07-01 10:48:57 UTC
cool, thanks for letting us know.