diff --git a/src/Widgets/WorkspaceThumb.vala b/src/Widgets/WorkspaceThumb.vala index 0dbb2c14..ddd5ec41 100644 --- a/src/Widgets/WorkspaceThumb.vala +++ b/src/Widgets/WorkspaceThumb.vala @@ -42,6 +42,7 @@ namespace Gala static GtkClutter.Texture? plus = null; Gtk.StyleContext selector_style; + Gtk.EventBox selector_style_widget; internal Clone wallpaper; Clutter.Actor windows; @@ -56,9 +57,9 @@ namespace Gala workspace = _workspace; screen = workspace.get_screen (); - var e = new Gtk.EventBox (); - e.show (); - selector_style = e.get_style_context (); + selector_style_widget = new Gtk.EventBox (); + selector_style_widget.show (); + selector_style = selector_style_widget.get_style_context (); selector_style.add_class ("gala-workspace-selected"); selector_style.add_provider (Utils.get_default_style (), Gtk.STYLE_PROVIDER_PRIORITY_FALLBACK); diff --git a/src/Widgets/WorkspaceView.vala b/src/Widgets/WorkspaceView.vala index 0674e251..9b76755b 100644 --- a/src/Widgets/WorkspaceView.vala +++ b/src/Widgets/WorkspaceView.vala @@ -37,6 +37,7 @@ namespace Gala bool wait_one_key_release; //called by shortcut, don't close it on first keyrelease Gtk.StyleContext background_style; + Gtk.EventBox background_style_widget; public WorkspaceView (Gala.Plugin _plugin) { @@ -47,9 +48,9 @@ namespace Gala reactive = true; clip_to_allocation = true; - var e = new Gtk.EventBox (); - e.show (); - background_style = e.get_style_context (); + background_style_widget = new Gtk.EventBox (); + background_style_widget.show (); + background_style = background_style_widget.get_style_context (); background_style.add_class ("gala-workspaces-background"); background_style.add_provider (Utils.get_default_style (), Gtk.STYLE_PROVIDER_PRIORITY_FALLBACK);