Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#3810 closed defect (fixed)

Trying to open the Journal the first time does not work

Reported by: erikos Owned by: dsd
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: 0.97.x
Severity: Blocker Keywords: olpc-test-passed
Cc: manuq, tonyforster, erikos, mikus Distribution/OS: OLPC
Bug Status: Assigned

Description

Trying to open the Journal the first time does not work, opening the second time does work. Steps to reproduce:

  • start Sugar
  • click on the Journal icon in the Favorites View
  • there is a window switch for a moment but the Journal does not open
  • click on the Journal icon in the Favorites View again

---> the Journal does start

  • start Sugar
  • reveal the Frame and click on the Journal icon
  • there is a window switch for a moment but the Journal does not open
  • reveal the Frame and click on the Journal icon again

---> the Journal does start

Change History (17)

comment:1 Changed 12 years ago by erikos

Actually, I just went back to 0.96.2 in the shell and on my F17 systems the issue is the same. /me is digging deeper.

comment:2 Changed 12 years ago by manuq

  • Cc manuq added

comment:3 Changed 12 years ago by erikos

Looking at the 'window-state-event' we get in the JournalActivity we first get a maximize event and then a second one which iconifies again.

1345198322.465396 DEBUG root: window_state_event_cb new_state=<flags GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED of type GdkWindowState> changed-mask=<flags GDK_WINDOW_STATE_MAXIMIZED of type GdkWindowState>
1345198322.466413 DEBUG root: window_state_event_cb new_state=<flags GDK_WINDOW_STATE_MAXIMIZED of type GdkWindowState> changed-mask=<flags GDK_WINDOW_STATE_ICONIFIED of type GdkWindowState>
1345198322.468571 DEBUG root: window_state_event_cb visible=True [(<frame object at 0x9ab6f2c>, '/home/erikos/sugar-build/install/lib/python2.7/site-packages/jarabe/journal/journalactivity.py', 327, '__window_state_event_cb', ["            logging.debug('window_state_event_cb visible=%r %s', visible, inspect.stack())\n"], 0), (<frame object at 0x8e23674>, '/home/erikos/sugar-build/install/bin/sugar-session', 277, 'main', ['        gtk.main()\n'], 0), (<frame object at 0x8b277dc>, '/home/erikos/sugar-build/install/bin/sugar-session', 293, '<module>', ['main()\n'], 0)]
1345198322.469575 DEBUG root: visibility_notify_event_cb visible=True
1345198322.470572 DEBUG root: visibility_notify_event_cb visible=True
1345198322.470704 DEBUG root: visibility_notify_event_cb visible=True
1345198322.473049 DEBUG root: window_state_event_cb new_state=<flags GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED of type GdkWindowState> changed-mask=<flags GDK_WINDOW_STATE_ICONIFIED of type GdkWindowState>
1345198322.473495 DEBUG root: window_state_event_cb visible=False [(<frame object at 0x9ab6f2c>, '/home/erikos/sugar-build/install/lib/python2.7/site-packages/jarabe/journal/journalactivity.py', 327, '__window_state_event_cb', ["            logging.debug('window_state_event_cb visible=%r %s', visible, inspect.stack())\n"], 0), (<frame object at 0x8e23674>, '/home/erikos/sugar-build/install/bin/sugar-session', 277, 'main', ['        gtk.main()\n'], 0), (<frame object at 0x8b277dc>, '/home/erikos/sugar-build/install/bin/sugar-session', 293, '<module>', ['main()\n'], 0)]
1345198322.473619 DEBUG root: canvas_visibility_notify_event_cb False

Next is to find out where the iconify event is coming from.

comment:4 follow-up: Changed 12 years ago by erikos

  • Keywords nohippo removed

Ahh, looks like this has been broken with the update from gtk2, gtk2-2.24.11 to gtk2-2.24.11. Easily reproducible when installing http://arm.koji.fedoraproject.org/koji/buildinfo?buildID=80312 on a 12.1.0 build in the XO (or doing an update in F17).

Looking at the commits between 2.24.10 and 2.24.11 this one does smell suspicious: http://git.gnome.org/browse/gtk+/commit/?h=gtk-2-24&id=3f6592f60fd15fb353fc84600caefba3054dc892

I remove the 'nohippo' flag as the regression has not been introduced by that.

comment:6 Changed 12 years ago by erikos

Is as well present in the GTK+ 3 shell.

comment:7 Changed 12 years ago by tonyforster

  • Cc tonyforster added

Looks like this applies to all Activities, clicking on the icon, either in the home view or in the top of the frame

comment:8 in reply to: ↑ 4 Changed 12 years ago by erikos

Replying to erikos:

Ahh, looks like this has been broken with the update from gtk2, gtk2-2.24.11 to gtk2-2.24.11. Easily reproducible when installing http://arm.koji.fedoraproject.org/koji/buildinfo?buildID=80312 on a 12.1.0 build in the XO (or doing an update in F17).

Looking at the commits between 2.24.10 and 2.24.11 this one does smell suspicious: http://git.gnome.org/browse/gtk+/commit/?h=gtk-2-24&id=3f6592f60fd15fb353fc84600caefba3054dc892

In GTK+ master the commit from above landed as well: 1c970036648bffd5d58499bb7c8e2439b84d4397

comment:9 Changed 12 years ago by dsd

  • Cc dsd added

I suspect that previously we never really iconified the Journal window correctly, but with the new GTK+ code maybe we do so now, which triggers a behaviour change.

Adding

         window.unminimize(Gtk.get_current_event_time())

in CurrentActivityIcon.button_release_event_cb solves this but causes some visual oddness first.

The root of the problem here is that we iconify the Journal when it is launched. I'm wondering if we have any other options here. We don't iconify windows under any other circumstances, as far as I can see.

Another option would be to look at the wnck code and compare how it handles iconify/deiconify.

I still haven't got my head around the event flow in window-state-event so I'm not very confident about the above.

comment:10 Changed 12 years ago by dsd

I don't think there are any other options at hand other than starting the Journal in iconified state. X and GDK do have support for mapping windows without displaying them (e.g. gdk_window_show_unraised()) but GTK+ does not support this.

(In fact, maybe we should be iconifying non-active activities in addition to the Journal. This might cause them to be unmapped, saving memory.)

Back to the problem at hand...

comment:11 Changed 12 years ago by dsd

Looks like a GTK+ regression, trivial to reproduce outside of Sugar. https://mail.gnome.org/archives/gtk-devel-list/2012-September/msg00042.html

comment:12 Changed 12 years ago by tonyforster

still present in OS3

comment:13 Changed 12 years ago by dsd

  • Cc erikos added; dsd removed
  • Owner changed from erikos to dsd
  • Status changed from new to accepted

comment:14 Changed 12 years ago by mikus

  • Cc mikus added

comment:15 Changed 12 years ago by dsd

  • Keywords olpc-test-pending added
  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in metacity-2.34.13

comment:16 Changed 12 years ago by greenfeld

  • Keywords olpc-test-passed added; olpc-test-pending removed

metacity-2.34.13 is in OLPC 13.1.0 os7 and I could not reproduce in the issue mentioned in that build.

comment:17 Changed 11 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.