Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public class Wingpanel.Application : Gtk.Application {

Granite.init ();

panel_window = new PanelWindow (this);
panel_window = new PanelWindow ();
add_window (panel_window);
panel_window.present ();

var toggle_indicator_action = new SimpleAction (TOGGLE_INDICATOR_ACTION_NAME, VariantType.STRING);
Expand Down
12 changes: 3 additions & 9 deletions src/PanelWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ public class Wingpanel.PanelWindow : Gtk.Window {

private Gtk.CssProvider? style_provider = null;

public PanelWindow (Gtk.Application application) {
Object (
application: application,
decorated: false,
resizable: false
);

construct {
popover_manager = new Services.PopoverManager ();

panel = new Widgets.Panel (popover_manager);
Expand All @@ -53,6 +47,8 @@ public class Wingpanel.PanelWindow : Gtk.Window {

child = box;
remove_css_class (Granite.STYLE_CLASS_BACKGROUND);
decorated = false;
resizable = false;

popover_manager.notify["indicator-open"].connect (() => {
if (!popover_manager.indicator_open) {
Expand All @@ -62,9 +58,7 @@ public class Wingpanel.PanelWindow : Gtk.Window {
Services.BackgroundManager.get_default ().remember_window ();
}
});
}

construct {
Services.BackgroundManager.get_default ().background_state_changed.connect (update_background);
}

Expand Down