From 513a7063ea983f30a016774fc41e7702eee96ec0809aeaf70e88a91b79464d51 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 28 Nov 2011 08:19:29 +0000 Subject: [PATCH] Accepting request 93771 from home:dimstar:branches:GNOME:Factory Update to 3.3.2 - Now also builds OBS-URL: https://build.opensuse.org/request/show/93771 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=90 --- gnome-shell-3.2.1.tar.bz2 | 3 - gnome-shell-3.3.2.tar.bz2 | 3 + ...l-cleanup-signal-handlers-on-destroy.patch | 41 -- gnome-shell-clutter-1.10.patch | 682 ++++++++++++++++++ gnome-shell-fix-deprecated-call.patch | 29 - gnome-shell.changes | 65 ++ gnome-shell.spec | 27 +- 7 files changed, 759 insertions(+), 91 deletions(-) delete mode 100644 gnome-shell-3.2.1.tar.bz2 create mode 100644 gnome-shell-3.3.2.tar.bz2 delete mode 100644 gnome-shell-cleanup-signal-handlers-on-destroy.patch create mode 100644 gnome-shell-clutter-1.10.patch delete mode 100644 gnome-shell-fix-deprecated-call.patch diff --git a/gnome-shell-3.2.1.tar.bz2 b/gnome-shell-3.2.1.tar.bz2 deleted file mode 100644 index 25f9229..0000000 --- a/gnome-shell-3.2.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb8e3e1e4cbda3dcef56159ee3760494991fac348877882105a07b6967ce00d5 -size 1296520 diff --git a/gnome-shell-3.3.2.tar.bz2 b/gnome-shell-3.3.2.tar.bz2 new file mode 100644 index 0000000..f13e673 --- /dev/null +++ b/gnome-shell-3.3.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51e0da7b020727fa114a892209fc8228d731f67c7d97d6caeb6e791be1d71e2a +size 1427374 diff --git a/gnome-shell-cleanup-signal-handlers-on-destroy.patch b/gnome-shell-cleanup-signal-handlers-on-destroy.patch deleted file mode 100644 index c19cd78..0000000 --- a/gnome-shell-cleanup-signal-handlers-on-destroy.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7945c56a9f2cb5c2dc8736bc46e92d225cca9251 Mon Sep 17 00:00:00 2001 -From: Giovanni Campagna -Date: Mon, 17 Oct 2011 15:18:25 +0200 -Subject: [PATCH] IMStatusChooserItem: clean up signal handlers on destroy() - -Extensions (like alternative-status-menu) expect that calling -destroy() on a menu item will not leave signal handlers around. - -https://bugzilla.gnome.org/show_bug.cgi?id=660520 ---- - js/ui/userMenu.js | 15 +++++++++++++++ - 1 files changed, 15 insertions(+), 0 deletions(-) - -diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js -index 40ca2f3..8bedfb9 100644 ---- a/js/ui/userMenu.js -+++ b/js/ui/userMenu.js -@@ -199,6 +199,21 @@ IMStatusChooserItem.prototype = { - })); - }, - -+ destroy: function() { -+ // clean up signal handlers -+ if (this._userLoadedId != 0) { -+ this._user.disconnect(this._userLoadedId); -+ this._userLoadedId = 0; -+ } -+ -+ if (this._userChangedId != 0) { -+ this._user.disconnect(this._userChangedId); -+ this._userChangedId = 0; -+ } -+ -+ PopupMenu.PopupBaseMenuItem.prototype.destroy.call(this); -+ }, -+ - // Override getColumnWidths()/setColumnWidths() to make the item - // independent from the overall column layout of the menu - getColumnWidths: function() { --- -1.7.6.4 diff --git a/gnome-shell-clutter-1.10.patch b/gnome-shell-clutter-1.10.patch new file mode 100644 index 0000000..f6d25f2 --- /dev/null +++ b/gnome-shell-clutter-1.10.patch @@ -0,0 +1,682 @@ +From c34eae9c3c8fd61d139506a382a40f64c039f3d2 Mon Sep 17 00:00:00 2001 +From: "Jasper St. Pierre" +Date: Mon, 21 Nov 2011 11:56:24 -0500 +Subject: [PATCH] Do not use the default stage + +https://bugzilla.gnome.org/show_bug.cgi?id=664052 +--- + js/ui/magnifier.js | 2 +- + src/gnome-shell-plugin.c | 2 +- + src/main.c | 249 --------------------------------------------- + src/shell-global.c | 248 ++++++++++++++++++++++++++++++++++++++++++++ + src/shell-xfixes-cursor.c | 24 +++-- + src/shell-xfixes-cursor.h | 2 +- + src/st/test-theme.c | 2 +- + src/test-recorder.c | 2 +- + 8 files changed, 270 insertions(+), 261 deletions(-) + +diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js +index c42c146..1a457ab 100644 +--- a/js/ui/magnifier.js ++++ b/js/ui/magnifier.js +@@ -46,7 +46,7 @@ Magnifier.prototype = { + this._zoomRegions = []; + + // Create small clutter tree for the magnified mouse. +- let xfixesCursor = Shell.XFixesCursor.get_default(); ++ let xfixesCursor = Shell.XFixesCursor.get_for_stage(global.stage); + this._mouseSprite = new Clutter.Texture(); + xfixesCursor.update_texture_image(this._mouseSprite); + this._cursorRoot = new Clutter.Group(); +diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c +index 4708e0a..5f3fab4 100644 +--- a/src/gnome-shell-plugin.c ++++ b/src/gnome-shell-plugin.c +@@ -323,7 +323,7 @@ gnome_shell_plugin_xevent_filter (MetaPlugin *plugin, + #endif + + if ((xev->xany.type == EnterNotify || xev->xany.type == LeaveNotify) +- && xev->xcrossing.window == clutter_x11_get_stage_window (CLUTTER_STAGE (clutter_stage_get_default ()))) ++ && xev->xcrossing.window == clutter_x11_get_stage_window (CLUTTER_STAGE (meta_plugin_get_stage (plugin)))) + { + /* If the pointer enters a child of the stage window (eg, a + * trayicon), we want to consider it to still be in the stage, +diff --git a/src/main.c b/src/main.c +index 42d1446..e1e8722 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -8,7 +8,6 @@ + #include + #include + +-#include + #include + #include + #include +@@ -160,157 +159,6 @@ shell_dbus_init (gboolean replace) + } + + static void +-constrain_tooltip (StTooltip *tooltip, +- const ClutterGeometry *geometry, +- ClutterGeometry *adjusted_geometry, +- gpointer data) +-{ +- const ClutterGeometry *tip_area = st_tooltip_get_tip_area (tooltip); +- ShellGlobal *global = shell_global_get (); +- MetaScreen *screen = shell_global_get_screen (global); +- int n_monitors = meta_screen_get_n_monitors (screen); +- int i; +- +- *adjusted_geometry = *geometry; +- +- /* A point that determines what screen we'll constrain to */ +- int x = tip_area->x + tip_area->width / 2; +- int y = tip_area->y + tip_area->height / 2; +- +- for (i = 0; i < n_monitors; i++) +- { +- MetaRectangle rect; +- meta_screen_get_monitor_geometry (screen, i, &rect); +- if (x >= rect.x && x < rect.x + rect.width && +- y >= rect.y && y < rect.y + rect.height) +- { +- if (adjusted_geometry->x + adjusted_geometry->width > rect.x + rect.width) +- adjusted_geometry->x = rect.x + rect.width - adjusted_geometry->width; +- if (adjusted_geometry->x < rect.x) +- adjusted_geometry->x = rect.x; +- +- if (adjusted_geometry->y + adjusted_geometry->height > rect.y + rect.height) +- adjusted_geometry->y = rect.y + rect.height - adjusted_geometry->height; +- if (adjusted_geometry->y < rect.y) +- adjusted_geometry->y = rect.y; +- +- return; +- } +- } +-} +- +-static void +-update_font_options (GtkSettings *settings) +-{ +- StThemeContext *context; +- ClutterStage *stage; +- ClutterBackend *backend; +- gint dpi; +- gint hinting; +- gchar *hint_style_str; +- cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_NONE; +- gint antialias; +- cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_NONE; +- cairo_font_options_t *options; +- +- g_object_get (settings, +- "gtk-xft-dpi", &dpi, +- "gtk-xft-antialias", &antialias, +- "gtk-xft-hinting", &hinting, +- "gtk-xft-hintstyle", &hint_style_str, +- NULL); +- +- stage = CLUTTER_STAGE (clutter_stage_get_default ()); +- context = st_theme_context_get_for_stage (stage); +- +- if (dpi != -1) +- /* GTK stores resolution as 1024 * dots/inch */ +- st_theme_context_set_resolution (context, dpi / 1024); +- else +- st_theme_context_set_default_resolution (context); +- +- st_tooltip_set_constrain_func (stage, constrain_tooltip, NULL, NULL); +- +- /* Clutter (as of 0.9) passes comprehensively wrong font options +- * override whatever set_font_flags() did above. +- * +- * http://bugzilla.openedhand.com/show_bug.cgi?id=1456 +- */ +- backend = clutter_get_default_backend (); +- options = cairo_font_options_create (); +- +- cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_ON); +- +- if (hinting >= 0 && !hinting) +- { +- hint_style = CAIRO_HINT_STYLE_NONE; +- } +- else if (hint_style_str) +- { +- if (strcmp (hint_style_str, "hintnone") == 0) +- hint_style = CAIRO_HINT_STYLE_NONE; +- else if (strcmp (hint_style_str, "hintslight") == 0) +- hint_style = CAIRO_HINT_STYLE_SLIGHT; +- else if (strcmp (hint_style_str, "hintmedium") == 0) +- hint_style = CAIRO_HINT_STYLE_MEDIUM; +- else if (strcmp (hint_style_str, "hintfull") == 0) +- hint_style = CAIRO_HINT_STYLE_FULL; +- } +- +- g_free (hint_style_str); +- +- cairo_font_options_set_hint_style (options, hint_style); +- +- /* We don't want to turn on subpixel anti-aliasing; since Clutter +- * doesn't currently have the code to support ARGB masks, +- * generating them then squashing them back to A8 is pointless. +- */ +- antialias_mode = (antialias < 0 || antialias) ? CAIRO_ANTIALIAS_GRAY +- : CAIRO_ANTIALIAS_NONE; +- +- cairo_font_options_set_antialias (options, antialias_mode); +- +- clutter_backend_set_font_options (backend, options); +- cairo_font_options_destroy (options); +-} +- +-static void +-settings_notify_cb (GtkSettings *settings, +- GParamSpec *pspec, +- gpointer data) +-{ +- update_font_options (settings); +-} +- +-static void +-shell_fonts_init (void) +-{ +- GtkSettings *settings; +- CoglPangoFontMap *fontmap; +- +- /* Disable text mipmapping; it causes problems on pre-GEM Intel +- * drivers and we should just be rendering text at the right +- * size rather than scaling it. If we do effects where we dynamically +- * zoom labels, then we might want to reconsider. +- */ +- fontmap = COGL_PANGO_FONT_MAP (clutter_get_font_map ()); +- cogl_pango_font_map_set_use_mipmapping (fontmap, FALSE); +- +- settings = gtk_settings_get_default (); +- g_object_connect (settings, +- "signal::notify::gtk-xft-dpi", +- G_CALLBACK (settings_notify_cb), NULL, +- "signal::notify::gtk-xft-antialias", +- G_CALLBACK (settings_notify_cb), NULL, +- "signal::notify::gtk-xft-hinting", +- G_CALLBACK (settings_notify_cb), NULL, +- "signal::notify::gtk-xft-hintstyle", +- G_CALLBACK (settings_notify_cb), NULL, +- NULL); +- update_font_options (settings); +-} +- +-static void + shell_prefs_init (void) + { + meta_prefs_override_preference_schema ("attach-modal-dialogs", +@@ -323,100 +171,6 @@ shell_prefs_init (void) + OVERRIDES_SCHEMA); + } + +-/* This is an IBus workaround. The flow of events with IBus is that every time +- * it gets gets a key event, it: +- * +- * Sends it to the daemon via D-Bus asynchronously +- * When it gets an reply, synthesizes a new GdkEvent and puts it into the +- * GDK event queue with gdk_event_put(), including +- * IBUS_FORWARD_MASK = 1 << 25 in the state to prevent a loop. +- * +- * (Normally, IBus uses the GTK+ key snooper mechanism to get the key +- * events early, but since our key events aren't visible to GTK+ key snoopers, +- * IBus will instead get the events via the standard +- * GtkIMContext.filter_keypress() mechanism.) +- * +- * There are a number of potential problems here; probably the worst +- * problem is that IBus doesn't forward the timestamp with the event +- * so that every key event that gets delivered ends up with +- * GDK_CURRENT_TIME. This creates some very subtle bugs; for example +- * if you have IBus running and a keystroke is used to trigger +- * launching an application, focus stealing prevention won't work +- * right. http://code.google.com/p/ibus/issues/detail?id=1184 +- * +- * In any case, our normal flow of key events is: +- * +- * GDK filter function => clutter_x11_handle_event => clutter actor +- * +- * So, if we see a key event that gets delivered via the GDK event handler +- * function - then we know it must be one of these synthesized events, and +- * we should push it back to clutter. +- * +- * To summarize, the full key event flow with IBus is: +- * +- * GDK filter function +- * => Mutter +- * => gnome_shell_plugin_xevent_filter() +- * => clutter_x11_handle_event() +- * => clutter event delivery to actor +- * => gtk_im_context_filter_event() +- * => sent to IBus daemon +- * => response received from IBus daemon +- * => gdk_event_put() +- * => GDK event handler +- * => +- * => clutter_event_put() +- * => clutter event delivery to actor +- * +- * Anything else we see here we just pass on to the normal GDK event handler +- * gtk_main_do_event(). +- */ +-static void +-gnome_shell_gdk_event_handler (GdkEvent *event_gdk, +- gpointer data) +-{ +- if (event_gdk->type == GDK_KEY_PRESS || event_gdk->type == GDK_KEY_RELEASE) +- { +- ClutterActor *stage; +- Window stage_xwindow; +- +- stage = clutter_stage_get_default (); +- stage_xwindow = clutter_x11_get_stage_window (CLUTTER_STAGE (stage)); +- +- if (GDK_WINDOW_XID (event_gdk->key.window) == stage_xwindow) +- { +- ClutterDeviceManager *device_manager = clutter_device_manager_get_default (); +- ClutterInputDevice *keyboard = clutter_device_manager_get_core_device (device_manager, +- CLUTTER_KEYBOARD_DEVICE); +- +- ClutterEvent *event_clutter = clutter_event_new ((event_gdk->type == GDK_KEY_PRESS) ? +- CLUTTER_KEY_PRESS : CLUTTER_KEY_RELEASE); +- event_clutter->key.time = event_gdk->key.time; +- event_clutter->key.flags = CLUTTER_EVENT_NONE; +- event_clutter->key.stage = CLUTTER_STAGE (stage); +- event_clutter->key.source = NULL; +- +- /* This depends on ClutterModifierType and GdkModifierType being +- * identical, which they are currently. (They both match the X +- * modifier state in the low 16-bits and have the same extensions.) */ +- event_clutter->key.modifier_state = event_gdk->key.state; +- +- event_clutter->key.keyval = event_gdk->key.keyval; +- event_clutter->key.hardware_keycode = event_gdk->key.hardware_keycode; +- event_clutter->key.unicode_value = gdk_keyval_to_unicode (event_clutter->key.keyval); +- event_clutter->key.device = keyboard; +- +- clutter_event_put (event_clutter); +- clutter_event_free (event_clutter); +- +- return; +- } +- } +- +- gtk_main_do_event (event_gdk); +-} +- +- + static void + malloc_statistics_callback (ShellPerfLog *perf_log, + gpointer data) +@@ -559,12 +313,9 @@ main (int argc, char **argv) + + shell_dbus_init (meta_get_replace_current_wm ()); + shell_a11y_init (); +- shell_fonts_init (); + shell_perf_log_init (); + shell_prefs_init (); + +- gdk_event_handler_set (gnome_shell_gdk_event_handler, NULL, NULL); +- + g_irepository_prepend_search_path (GNOME_SHELL_PKGLIBDIR); + #if HAVE_BLUETOOTH + g_irepository_prepend_search_path (BLUETOOTH_DIR); +diff --git a/src/shell-global.c b/src/shell-global.c +index 1151951..ba334cb 100644 +--- a/src/shell-global.c ++++ b/src/shell-global.c +@@ -15,6 +15,7 @@ + #endif + + #include ++#include + #include + #include + #include +@@ -788,6 +789,249 @@ global_stage_after_paint (ClutterStage *stage, + "clutter.stagePaintDone"); + } + ++static void ++constrain_tooltip (StTooltip *tooltip, ++ const ClutterGeometry *geometry, ++ ClutterGeometry *adjusted_geometry, ++ gpointer data) ++{ ++ const ClutterGeometry *tip_area = st_tooltip_get_tip_area (tooltip); ++ ShellGlobal *global = shell_global_get (); ++ MetaScreen *screen = shell_global_get_screen (global); ++ int n_monitors = meta_screen_get_n_monitors (screen); ++ int i; ++ ++ *adjusted_geometry = *geometry; ++ ++ /* A point that determines what screen we'll constrain to */ ++ int x = tip_area->x + tip_area->width / 2; ++ int y = tip_area->y + tip_area->height / 2; ++ ++ for (i = 0; i < n_monitors; i++) ++ { ++ MetaRectangle rect; ++ meta_screen_get_monitor_geometry (screen, i, &rect); ++ if (x >= rect.x && x < rect.x + rect.width && ++ y >= rect.y && y < rect.y + rect.height) ++ { ++ if (adjusted_geometry->x + adjusted_geometry->width > rect.x + rect.width) ++ adjusted_geometry->x = rect.x + rect.width - adjusted_geometry->width; ++ if (adjusted_geometry->x < rect.x) ++ adjusted_geometry->x = rect.x; ++ ++ if (adjusted_geometry->y + adjusted_geometry->height > rect.y + rect.height) ++ adjusted_geometry->y = rect.y + rect.height - adjusted_geometry->height; ++ if (adjusted_geometry->y < rect.y) ++ adjusted_geometry->y = rect.y; ++ ++ return; ++ } ++ } ++} ++ ++static void ++update_font_options (GtkSettings *settings, ++ ClutterStage *stage) ++{ ++ StThemeContext *context; ++ ClutterBackend *backend; ++ gint dpi; ++ gint hinting; ++ gchar *hint_style_str; ++ cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_NONE; ++ gint antialias; ++ cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_NONE; ++ cairo_font_options_t *options; ++ ++ g_object_get (settings, ++ "gtk-xft-dpi", &dpi, ++ "gtk-xft-antialias", &antialias, ++ "gtk-xft-hinting", &hinting, ++ "gtk-xft-hintstyle", &hint_style_str, ++ NULL); ++ ++ context = st_theme_context_get_for_stage (stage); ++ ++ if (dpi != -1) ++ /* GTK stores resolution as 1024 * dots/inch */ ++ st_theme_context_set_resolution (context, dpi / 1024); ++ else ++ st_theme_context_set_default_resolution (context); ++ ++ st_tooltip_set_constrain_func (stage, constrain_tooltip, NULL, NULL); ++ ++ /* Clutter (as of 0.9) passes comprehensively wrong font options ++ * override whatever set_font_flags() did above. ++ * ++ * http://bugzilla.openedhand.com/show_bug.cgi?id=1456 ++ */ ++ backend = clutter_get_default_backend (); ++ options = cairo_font_options_create (); ++ ++ cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_ON); ++ ++ if (hinting >= 0 && !hinting) ++ { ++ hint_style = CAIRO_HINT_STYLE_NONE; ++ } ++ else if (hint_style_str) ++ { ++ if (strcmp (hint_style_str, "hintnone") == 0) ++ hint_style = CAIRO_HINT_STYLE_NONE; ++ else if (strcmp (hint_style_str, "hintslight") == 0) ++ hint_style = CAIRO_HINT_STYLE_SLIGHT; ++ else if (strcmp (hint_style_str, "hintmedium") == 0) ++ hint_style = CAIRO_HINT_STYLE_MEDIUM; ++ else if (strcmp (hint_style_str, "hintfull") == 0) ++ hint_style = CAIRO_HINT_STYLE_FULL; ++ } ++ ++ g_free (hint_style_str); ++ ++ cairo_font_options_set_hint_style (options, hint_style); ++ ++ /* We don't want to turn on subpixel anti-aliasing; since Clutter ++ * doesn't currently have the code to support ARGB masks, ++ * generating them then squashing them back to A8 is pointless. ++ */ ++ antialias_mode = (antialias < 0 || antialias) ? CAIRO_ANTIALIAS_GRAY ++ : CAIRO_ANTIALIAS_NONE; ++ ++ cairo_font_options_set_antialias (options, antialias_mode); ++ ++ clutter_backend_set_font_options (backend, options); ++ cairo_font_options_destroy (options); ++} ++ ++static void ++settings_notify_cb (GtkSettings *settings, ++ GParamSpec *pspec, ++ gpointer data) ++{ ++ update_font_options (settings, CLUTTER_STAGE (data)); ++} ++ ++static void ++shell_fonts_init (ClutterStage *stage) ++{ ++ GtkSettings *settings; ++ CoglPangoFontMap *fontmap; ++ ++ /* Disable text mipmapping; it causes problems on pre-GEM Intel ++ * drivers and we should just be rendering text at the right ++ * size rather than scaling it. If we do effects where we dynamically ++ * zoom labels, then we might want to reconsider. ++ */ ++ fontmap = COGL_PANGO_FONT_MAP (clutter_get_font_map ()); ++ cogl_pango_font_map_set_use_mipmapping (fontmap, FALSE); ++ ++ settings = gtk_settings_get_default (); ++ g_object_connect (settings, ++ "signal::notify::gtk-xft-dpi", ++ G_CALLBACK (settings_notify_cb), stage, ++ "signal::notify::gtk-xft-antialias", ++ G_CALLBACK (settings_notify_cb), stage, ++ "signal::notify::gtk-xft-hinting", ++ G_CALLBACK (settings_notify_cb), stage, ++ "signal::notify::gtk-xft-hintstyle", ++ G_CALLBACK (settings_notify_cb), stage, ++ NULL); ++ update_font_options (settings, stage); ++} ++ ++/* This is an IBus workaround. The flow of events with IBus is that every time ++ * it gets gets a key event, it: ++ * ++ * Sends it to the daemon via D-Bus asynchronously ++ * When it gets an reply, synthesizes a new GdkEvent and puts it into the ++ * GDK event queue with gdk_event_put(), including ++ * IBUS_FORWARD_MASK = 1 << 25 in the state to prevent a loop. ++ * ++ * (Normally, IBus uses the GTK+ key snooper mechanism to get the key ++ * events early, but since our key events aren't visible to GTK+ key snoopers, ++ * IBus will instead get the events via the standard ++ * GtkIMContext.filter_keypress() mechanism.) ++ * ++ * There are a number of potential problems here; probably the worst ++ * problem is that IBus doesn't forward the timestamp with the event ++ * so that every key event that gets delivered ends up with ++ * GDK_CURRENT_TIME. This creates some very subtle bugs; for example ++ * if you have IBus running and a keystroke is used to trigger ++ * launching an application, focus stealing prevention won't work ++ * right. http://code.google.com/p/ibus/issues/detail?id=1184 ++ * ++ * In any case, our normal flow of key events is: ++ * ++ * GDK filter function => clutter_x11_handle_event => clutter actor ++ * ++ * So, if we see a key event that gets delivered via the GDK event handler ++ * function - then we know it must be one of these synthesized events, and ++ * we should push it back to clutter. ++ * ++ * To summarize, the full key event flow with IBus is: ++ * ++ * GDK filter function ++ * => Mutter ++ * => gnome_shell_plugin_xevent_filter() ++ * => clutter_x11_handle_event() ++ * => clutter event delivery to actor ++ * => gtk_im_context_filter_event() ++ * => sent to IBus daemon ++ * => response received from IBus daemon ++ * => gdk_event_put() ++ * => GDK event handler ++ * => ++ * => clutter_event_put() ++ * => clutter event delivery to actor ++ * ++ * Anything else we see here we just pass on to the normal GDK event handler ++ * gtk_main_do_event(). ++ */ ++static void ++gnome_shell_gdk_event_handler (GdkEvent *event_gdk, ++ gpointer data) ++{ ++ if (event_gdk->type == GDK_KEY_PRESS || event_gdk->type == GDK_KEY_RELEASE) ++ { ++ ClutterActor *stage; ++ Window stage_xwindow; ++ ++ stage = CLUTTER_ACTOR (data); ++ stage_xwindow = clutter_x11_get_stage_window (CLUTTER_STAGE (stage)); ++ ++ if (GDK_WINDOW_XID (event_gdk->key.window) == stage_xwindow) ++ { ++ ClutterDeviceManager *device_manager = clutter_device_manager_get_default (); ++ ClutterInputDevice *keyboard = clutter_device_manager_get_core_device (device_manager, ++ CLUTTER_KEYBOARD_DEVICE); ++ ++ ClutterEvent *event_clutter = clutter_event_new ((event_gdk->type == GDK_KEY_PRESS) ? ++ CLUTTER_KEY_PRESS : CLUTTER_KEY_RELEASE); ++ event_clutter->key.time = event_gdk->key.time; ++ event_clutter->key.flags = CLUTTER_EVENT_NONE; ++ event_clutter->key.stage = CLUTTER_STAGE (stage); ++ event_clutter->key.source = NULL; ++ ++ /* This depends on ClutterModifierType and GdkModifierType being ++ * identical, which they are currently. (They both match the X ++ * modifier state in the low 16-bits and have the same extensions.) */ ++ event_clutter->key.modifier_state = event_gdk->key.state; ++ ++ event_clutter->key.keyval = event_gdk->key.keyval; ++ event_clutter->key.hardware_keycode = event_gdk->key.hardware_keycode; ++ event_clutter->key.unicode_value = gdk_keyval_to_unicode (event_clutter->key.keyval); ++ event_clutter->key.device = keyboard; ++ ++ clutter_event_put (event_clutter); ++ clutter_event_free (event_clutter); ++ ++ return; ++ } ++ } ++ ++ gtk_main_do_event (event_gdk); ++} ++ + void + _shell_global_set_plugin (ShellGlobal *global, + MetaPlugin *plugin) +@@ -833,6 +1077,10 @@ _shell_global_set_plugin (ShellGlobal *global, + g_signal_connect (global->meta_display, "notify::focus-window", + G_CALLBACK (focus_window_changed), global); + ++ shell_fonts_init (global->stage); ++ ++ gdk_event_handler_set (gnome_shell_gdk_event_handler, global->stage, NULL); ++ + global->focus_manager = st_focus_manager_get_for_stage (global->stage); + } + +diff --git a/src/shell-xfixes-cursor.c b/src/shell-xfixes-cursor.c +index df7ff5b..7946b9c 100644 +--- a/src/shell-xfixes-cursor.c ++++ b/src/shell-xfixes-cursor.c +@@ -320,19 +320,29 @@ shell_xfixes_cursor_class_init (ShellXFixesCursorClass *klass) + } + + /** +- * shell_xfixes_cursor_get_default: ++ * shell_xfixes_cursor_get_for_stage: ++ * @stage: (transfer none): The #ClutterStage attached to the cursor + * +- * Return value: (transfer none): The global #ShellXFixesCursor singleton ++ * Return value: (transfer none): A #ShellXFixesCursor instance + */ + ShellXFixesCursor * +-shell_xfixes_cursor_get_default () ++shell_xfixes_cursor_get_for_stage (ClutterStage *stage) + { +- static ShellXFixesCursor *instance = NULL; ++ ShellXFixesCursor *instance; ++ static GQuark xfixes_cursor_quark; ++ ++ if (G_UNLIKELY (xfixes_cursor_quark == 0)) ++ xfixes_cursor_quark = g_quark_from_static_string ("gnome-shelll::xfixes-cursor"); ++ ++ instance = g_object_get_qdata (G_OBJECT (stage), xfixes_cursor_quark); + + if (instance == NULL) +- instance = g_object_new (SHELL_TYPE_XFIXES_CURSOR, +- "stage", clutter_stage_get_default (), +- NULL); ++ { ++ instance = g_object_new (SHELL_TYPE_XFIXES_CURSOR, ++ "stage", stage, ++ NULL); ++ g_object_set_qdata (G_OBJECT (stage), xfixes_cursor_quark, instance); ++ } + + return instance; + } +diff --git a/src/shell-xfixes-cursor.h b/src/shell-xfixes-cursor.h +index 28af3d1..d84d5aa 100644 +--- a/src/shell-xfixes-cursor.h ++++ b/src/shell-xfixes-cursor.h +@@ -19,7 +19,7 @@ typedef struct _ShellXFixesCursorClass ShellXFixesCursorClass; + + GType shell_xfixes_cursor_get_type (void) G_GNUC_CONST; + +-ShellXFixesCursor *shell_xfixes_cursor_get_default (void); ++ShellXFixesCursor *shell_xfixes_cursor_get_for_stage (ClutterStage *stage); + + void shell_xfixes_cursor_show (ShellXFixesCursor *xfixes_cursor); + void shell_xfixes_cursor_hide (ShellXFixesCursor *xfixes_cursor); +diff --git a/src/st/test-theme.c b/src/st/test-theme.c +index db7f747..73dbc93 100644 +--- a/src/st/test-theme.c ++++ b/src/st/test-theme.c +@@ -432,7 +432,7 @@ main (int argc, char **argv) + theme = st_theme_new ("st/test-theme.css", + NULL, NULL); + +- stage = clutter_stage_get_default (); ++ stage = clutter_stage_new (); + context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage)); + st_theme_context_set_theme (context, theme); + st_theme_context_set_resolution (context, 96.); +diff --git a/src/test-recorder.c b/src/test-recorder.c +index e443322..266edf9 100644 +--- a/src/test-recorder.c ++++ b/src/test-recorder.c +@@ -36,7 +36,7 @@ int main (int argc, char **argv) + clutter_color_from_string (&red, "red"); + clutter_color_from_string (&green, "green"); + clutter_color_from_string (&blue, "blue"); +- stage = clutter_stage_get_default (); ++ stage = clutter_stage_new (); + + text = g_object_new (CLUTTER_TYPE_TEXT, + "text", "Red", +-- +1.7.7.3 diff --git a/gnome-shell-fix-deprecated-call.patch b/gnome-shell-fix-deprecated-call.patch deleted file mode 100644 index f33b584..0000000 --- a/gnome-shell-fix-deprecated-call.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b62f5ef07d87db7835fa753fe1774a5ed32d871d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Mon, 24 Oct 2011 15:52:13 +0200 -Subject: [PATCH] telepathy-client: Replace shell_util_new_from_string - -The function has been removed in commit 786cfbd3976, but one user -was overlooked when replacing it. - -https://bugzilla.gnome.org/show_bug.cgi?id=661231 ---- - js/ui/telepathyClient.js | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js -index 695a12b..3c14eda 100644 ---- a/js/ui/telepathyClient.js -+++ b/js/ui/telepathyClient.js -@@ -1297,7 +1297,7 @@ MultiNotificationSource.prototype = { - }, - - createNotificationIcon: function() { -- return new St.Icon({ gicon: Shell.util_icon_from_string(this._icon), -+ return new St.Icon({ gicon: Gio.icon_new_for_string(this._icon), - icon_type: St.IconType.FULLCOLOR, - icon_size: this.ICON_SIZE }); - } --- -1.7.7 - diff --git a/gnome-shell.changes b/gnome-shell.changes index 47a285c..1d29de6 100644 --- a/gnome-shell.changes +++ b/gnome-shell.changes @@ -1,3 +1,68 @@ +------------------------------------------------------------------- +Tue Nov 22 19:51:50 UTC 2011 - dimstar@opensuse.org + +- Update to version 3.3.2: + + Port D-Bus usage in the shell to GDBus [bgo#648651, bgo#658078, + bgo#663902, bgo#663941] + + Message tray + - Add right-click option to chats to mute the conversation + [bgo#659962] + - Don't steal the focus when popping up under the pointer + [bgo#661358] + + Looking Glass + - Add alt-Tab completion [bgo#661054] + - Show errors from extensions in the extensions tab + [bgo#660546] + - Allow switching tabs with PageUp/PageDown + - Theme consistently with the rest of the shell [bgo#650900] + + Extension system + - Don't try to load disabled extensions at all [bgo#661815, + bgo#662704] + - Enable and disable plugins in a consistent order [bgo#661815, + bgo#662704] + - Add options to enable/disable extensions to + gnome-shell-extension-tool [bgo#661815] + + Adapt to Mutter change to GSettings [bgo#663429] + + Allow creating a new workspace by dragging a window or launcher + in the middle of two existing ones [bgo#646409] + + Allow using Alt-Tab while during drag-and-drop and other + operations that grab the pointer [bgo#660457] + + Do a better job of finding the right user to authenticate as + when showing a PolKit dialog [bgo#651547] + + Control the D-Bus Eval() method by the developer-tools GSetting + which is used for looking glass and screen recorder. + [bgo#662891] + + Fix browser plugin to work under WebKit-based browser + [bgo#663823] + + Fix certain stacking issues with alt-Tab [bgo#660650] + + Fixes for GLib deprecations [bgo#662011] + + Fixes for GTK+ deprecations [bgo#662245] + + Fixes for Clutter deprecations [bgo#662627] + + Visual improvements and UI tweaks [bgo#662800, bgo#658096, + bgo#662226] + + Hard-code "Home" as the name for the home dir, rather than + looking it up via GSettings; avoids schema dependency + [bgo#559895] + + Don't show "Switch User" on single user machines [bgo#657011] + + Generate documentation for St toolkit + + Improve marking of strings for translation [bgo#658664] + + Networking menu bug fixes [bgo#650007, bgo#651378, bgo#659277, + bgo#663278] + + Code cleanups and leak fixes to StTextureCache [bgo#660968, + bgo#662998] + + Code cleanups [bgo#662238, bgo#663584] + + Build fixes + + Bugs fixed: bgo#660520, bgo#661029, bgo#661231, bgo#661623, + bgo#661921, bgo#662235, bgo#662236, bgo#662502, bgo#662394, + bgo#662799, bgo#662969, bgo#663175, bgo#663277, bgo#663815, + bgo#663891, bgo#662967 + + Updated translations. +- Drop gnome-shell-cleanup-signal-handlers-on-destroy.patch and + gnome-shell-fix-deprecated-call.patch: fixed upstream. +- Add gnome-shell-clutter-1.10.patch: Fix build with clutter 1.10. +- Remove gconf schema handling scriptlets, there are no more gconf + schemas being used. + ------------------------------------------------------------------- Wed Oct 26 11:28:56 UTC 2011 - fcrozat@suse.com diff --git a/gnome-shell.spec b/gnome-shell.spec index ed811ee..c03bbad 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -18,17 +18,15 @@ Name: gnome-shell -Version: 3.2.1 +Version: 3.3.2 Release: 1 License: GPLv2+ Summary: GNOME Shell Group: System/GUI/GNOME Url: http://live.gnome.org/GnomeShell -Source: http://download.gnome.org/sources/gnome-shell/3.2/%{name}-%{version}.tar.bz2 -# PATCH-FIX-UPSTREAM gnome-shell-cleanup-signal-handlers-on-destroy.patch bnc#725004 sysrich@linux.com -- patch to fix some issue when using extensions changing the usermenu -Patch0: gnome-shell-cleanup-signal-handlers-on-destroy.patch -# PATCH-FIX-UPSTREAM gnome-shell-fix-deprecated-call.patch bgo#661231 fcrozat@suse.com -- fix deprecated function call -Patch1: gnome-shell-fix-deprecated-call.patch +Source: http://download.gnome.org/sources/gnome-shell/3.3/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM gnome-shell-clutter-1.10.patch bgo#664052 dimstar@opensuse.org -- Fix build with clutter 1.10 +Patch0: gnome-shell-clutter-1.10.patch BuildRequires: intltool BuildRequires: translation-update-upstream BuildRequires: update-desktop-files @@ -39,7 +37,7 @@ BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(folks) >= 0.5.2 BuildRequires: pkgconfig(gconf-2.0) BuildRequires: pkgconfig(gdk-pixbuf-2.0) -BuildRequires: pkgconfig(gio-2.0) >= 2.29.10 +BuildRequires: pkgconfig(gio-2.0) >= 2.31.0 BuildRequires: pkgconfig(gjs-1.0) >= 1.29.18 BuildRequires: pkgconfig(gnome-bluetooth-1.0) >= 3.1.0 BuildRequires: pkgconfig(gnome-desktop-3.0) @@ -53,7 +51,7 @@ BuildRequires: pkgconfig(libcanberra) BuildRequires: pkgconfig(libcroco-0.6) BuildRequires: pkgconfig(libedataserver-1.2) >= 1.2.0 BuildRequires: pkgconfig(libgnome-menu-3.0) -BuildRequires: pkgconfig(libmutter) >= 3.2.1 +BuildRequires: pkgconfig(libmutter) >= 3.3.2 BuildRequires: pkgconfig(libnm-glib) BuildRequires: pkgconfig(libnm-util) BuildRequires: pkgconfig(libpulse-mainloop-glib) @@ -93,7 +91,6 @@ Requires: libgdmgreeter1 Recommends: %{name}-browser-plugin Recommends: %{name}-lang BuildRoot: %{_tmppath}/%{name}-%{version}-build -%gconf_schemas_prereq %glib2_gsettings_schema_requires %description @@ -119,7 +116,6 @@ to enable, disable and install them. %prep %setup -q %patch0 -p1 -%patch1 -p1 translation-update-upstream %build @@ -139,17 +135,10 @@ find %{buildroot} -type f -name "*.la" -delete -print install -d %{buildroot}%{_datadir}/gnome-shell/extensions %find_lang %{name} %{?no_lang_C} %suse_update_desktop_file %{name} -%find_gconf_schemas %clean rm -rf %{buildroot} -%pre -f %{name}.schemas_pre - -%posttrans -f %{name}.schemas_posttrans - -%preun -f %{name}.schemas_preun - %post %glib2_gsettings_schema_post %desktop_database_post @@ -158,7 +147,7 @@ rm -rf %{buildroot} %glib2_gsettings_schema_postun %desktop_database_postun -%files -f %{name}.schemas_list +%files %defattr(-,root,root) %doc COPYING README NEWS %{_bindir}/gnome-shell @@ -174,6 +163,8 @@ rm -rf %{buildroot} %{_datadir}/gnome-shell/ %dir %{_datadir}/gnome-shell/extensions %doc %{_mandir}/man?/gnome-shell.* +%{_datadir}/gtk-doc/html/st/ +%{_datadir}/gtk-doc/html/shell/ %files browser-plugin %defattr(-,root,root)