Commit 372a6d4c authored by Michael Terry's avatar Michael Terry

workaround compiz/unity bug with iconified windows for now; we can reinstate...

workaround compiz/unity bug with iconified windows for now; we can reinstate old behavior when it is fixed
parent 9cbce6a7
......@@ -146,9 +146,9 @@ public abstract class Assistant : Gtk.Window
}
}
public virtual void hide_for_now()
public void hide_for_now()
{
hide();
DejaDup.hide_background_window_for_shell(this);
}
public bool is_interrupted()
......
......@@ -573,23 +573,6 @@ public abstract class AssistantOperation : Assistant
else if (page == password_page)
set_header_icon(Gtk.Stock.DIALOG_AUTHENTICATION);
}
// Minimize or hide when operation is in progress. Used when user closes
// window or after a password interruption.
public override void hide_for_now()
{
if (status_icon != null && status_icon.close_action == StatusIcon.CloseAction.MINIMIZE) {
// We show in case we are just starting up (like in automatic mode) and
// haven't been shown yet. Ideally we'd just iconify then show, but
// window managers are dumb and don't start iconified in that situation,
// so to help them, we iconify again.
iconify();
show();
iconify();
}
else
hide();
}
// Make Deja Dup invisible, used when we are shutting down or some such.
public void hide_everything()
......
......@@ -77,7 +77,6 @@ public abstract class StatusIcon : Object
public DejaDup.Operation op {get; construct;}
public bool automatic {get; construct; default = false;}
public CloseAction close_action {get; protected set; default = CloseAction.HIDE;}
public bool show_automatic_progress {get; protected set; default = false;}
protected bool is_valid = true;
......@@ -204,7 +203,6 @@ class UnityStatusIcon : StatusIcon
construct {
entry = hacks_unity_get_entry();
is_valid = entry != null;
close_action = CloseAction.MINIMIZE;
show_automatic_progress = true;
if (is_valid)
hacks_unity_entry_set_menu(entry, ensure_menu(false));
......
......@@ -83,14 +83,40 @@ public void show_background_window_for_shell(Gtk.Window win)
if (get_shell() == ShellEnv.UNITY) {
// Show as a launcher icon instead of a window in the background
/* Unity in Ubuntu 11.10 has bad behavior when using iconify. So instead,
we just show as a legit background window.
See https://launchpad.net/bugs/732997 */
win.show();
/*
win.iconify();
win.show();
win.iconify(); // In case WM didn't respect first iconify
*/
}
else
win.show();
}
public void hide_background_window_for_shell(Gtk.Window win)
{
if (get_shell() == ShellEnv.UNITY) {
/* Unity in Ubuntu 11.10 has bad behavior when using iconify. So instead,
we just show as a legit background window. (We can't straight up hide
because then user would have no way to get at the window.)
See https://launchpad.net/bugs/732997 */
win.focus_on_map = false;
win.show();
/*
// "Hide" in launcher
win.iconify();
win.show();
win.iconify(); // In case WM didn't respect first iconify
*/
}
else
win.hide();
}
public void destroy_widget(Gtk.Widget w)
{
// We destroy in the idle loop for two reasons:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment