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 610324 - Assert in _shell_app_system_register_app
Assert in _shell_app_system_register_app
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-18 01:41 UTC by Maxim Ermilov
Modified: 2010-02-21 00:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
get_app_for_window_direct search ShellApp by window, before create. (2.51 KB, patch)
2010-02-18 01:44 UTC, Maxim Ermilov
needs-work Details | Review
get_app_for_window_direct search ShellApp by window, before create. (2.92 KB, patch)
2010-02-19 21:58 UTC, Maxim Ermilov
committed Details | Review

Description Maxim Ermilov 2010-02-18 01:41:56 UTC
To reproduce, move Nautilus window from one workspace to any other.
Comment 1 Maxim Ermilov 2010-02-18 01:44:08 UTC
Created attachment 154100 [details] [review]
get_app_for_window_direct search ShellApp by window, before create.
Comment 2 Colin Walters 2010-02-19 20:43:44 UTC
I can't reproduce this by moving Nautilus; can anyone else?
Comment 3 Colin Walters 2010-02-19 20:52:17 UTC
Review of attachment 154100 [details] [review]:

Oh; on second thought, I see how this could occur, your Nautilus window is probably not app-tracked.

::: src/shell-app-system.c
@@ +486,3 @@
 }
+shell_app_system_lookup_by_window (ShellAppSystem *self, MetaWindow *window)
+ShellApp *

This needs to conform to the coding style:

* Needs a documentation header
* needs (transfer full) on the return value
* Separate indented lines for parameters

I'd prefer this function be called "shell_app_system_get_app_for_window" since it's similar to shell_app_system_get_app.  If the app isn't found, then you call _shell_app_new_for_window.

::: src/shell-window-tracker.c
@@ +310,3 @@
+      if (app == NULL)
+      app = shell_app_system_lookup_by_window (appsys, window);
+    {

Then this code just becomes: return shell_app_system_get_app_for_window (appsys, window);
Comment 4 Maxim Ermilov 2010-02-19 21:58:54 UTC
Created attachment 154250 [details] [review]
get_app_for_window_direct search ShellApp by window, before create.
Comment 5 Colin Walters 2010-02-20 23:09:53 UTC
Review of attachment 154250 [details] [review]:

Looks good, thank you!
Comment 6 Colin Walters 2010-02-20 23:10:59 UTC
Review of attachment 154250 [details] [review]:

Actually one comment.

::: src/shell-app-system.c
@@ +495,3 @@
+ * @self: A #ShellAppSystem
+ * shell_app_system_get_app_for_window:
+/**

Oh actually I missed this part, this needs to be:

ShellApp *
shell_app_system_get_app_for_window (ShellAppSystem *self,
                                     MetaWindow     *window)