summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2018-09-18 02:32:03 +0900
committerQue Quotion2018-09-18 02:32:03 +0900
commiteda51b1fb93ecf8564bfd01672ccb69c8c2570b3 (patch)
tree4d1c126e18dc66e0a5078d72ed008cc1103ee18f
parenteb9009776fc9ee0575cf1a1370d2bcbdbbb2649b (diff)
downloadaur-eda51b1fb93ecf8564bfd01672ccb69c8c2570b3.tar.gz
Also check for workspace and viewport changes in "Dodge(-Float)"
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--autohide.patch43
3 files changed, 29 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2322ef85ed3..d7eea2cf11e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -52,7 +52,7 @@ pkgbase = wingpanel-standalone-git
sha256sums = 7f972d79b4d72f7b274a96e1a5150cba0e3869ad85215ae01ad2bc19802cdbb9
sha256sums = 20ec1d51a6610bf0105c772e4d1d4ac8f35ea0ee33b066981db57dc19fe3bdc6
sha256sums = b1902c1d44ac546df63cd0224a7d2ef2cb6394ca556512c30c370d387db7bbab
- sha256sums = d14dcf9e151f3cf920ea589c4fc935387ce74b83c5c72c162911516a62b4c5eb
+ sha256sums = b3fee5c6afdc5dcf4cc6150b24483984943ed6becdc15493a9aeb6c5d353f877
sha256sums = 53bfa2220d14065ca848c36217abe812685c7d6e0d42251423d0faa2a0ac5394
pkgname = wingpanel-standalone-git
diff --git a/PKGBUILD b/PKGBUILD
index 46bed7f49e8..faace53be47 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -34,7 +34,7 @@ sha256sums=('SKIP'
'7f972d79b4d72f7b274a96e1a5150cba0e3869ad85215ae01ad2bc19802cdbb9'
'20ec1d51a6610bf0105c772e4d1d4ac8f35ea0ee33b066981db57dc19fe3bdc6'
'b1902c1d44ac546df63cd0224a7d2ef2cb6394ca556512c30c370d387db7bbab'
- 'd14dcf9e151f3cf920ea589c4fc935387ce74b83c5c72c162911516a62b4c5eb'
+ 'b3fee5c6afdc5dcf4cc6150b24483984943ed6becdc15493a9aeb6c5d353f877'
'53bfa2220d14065ca848c36217abe812685c7d6e0d42251423d0faa2a0ac5394')
pkgver() {
diff --git a/autohide.patch b/autohide.patch
index 7f4aa585a01..74587a3e0f8 100644
--- a/autohide.patch
+++ b/autohide.patch
@@ -52,17 +52,6 @@ index c48b5ea..81ec2f2 100644
public PanelWindow (Gtk.Application application) {
Object (
-@@ -52,6 +58,10 @@ public class Wingpanel.PanelWindow : Gtk.Window {
- this.screen.size_changed.connect (update_panel_dimensions);
- this.screen.monitors_changed.connect (update_panel_dimensions);
- this.screen_changed.connect (update_visual);
-+ wnck_screen.active_window_changed.connect (active_window_changed);
-+ this.enter_notify_event.connect (show_panel);
-+ this.motion_notify_event.connect (show_panel);
-+ this.leave_notify_event.connect (hide_panel);
-
- update_visual ();
-
@@ -71,17 +79,40 @@ public class Wingpanel.PanelWindow : Gtk.Window {
application.add_accelerator ("<Control>Tab", "app.cycle", null);
application.add_accelerator ("<Control><Shift>Tab", "app.cycle-back", null);
@@ -109,7 +98,7 @@ index c48b5ea..81ec2f2 100644
return true;
}
-@@ -91,7 +115,151 @@ public class Wingpanel.PanelWindow : Gtk.Window {
+@@ -91,7 +115,173 @@ public class Wingpanel.PanelWindow : Gtk.Window {
Services.BackgroundManager.initialize (this.monitor_number, panel_height);
@@ -128,6 +117,18 @@ index c48b5ea..81ec2f2 100644
+ active_window.state_changed.connect (active_window_state_changed);
+ }
+
++ private void active_workspace_changed (Wnck.Workspace? prev_active_workspace) {
++ unowned Wnck.Window? active_window = wnck_screen.get_active_window();
++ if (autohide == "Dodge" || autohide == "Dodge-Float")
++ update_visibility_active_change (active_window);
++ }
++
++ private void viewports_changed (Wnck.Screen? screen) {
++ unowned Wnck.Window? active_window = wnck_screen.get_active_window();
++ if (autohide == "Dodge" || autohide == "Dodge-Float")
++ update_visibility_active_change (active_window);
++ }
++
+ private void active_window_state_changed (Wnck.Window? window,
+ Wnck.WindowState changed_mask, Wnck.WindowState new_state) {
+ if (autohide == "Dodge" || autohide == "Dodge-Float")
@@ -145,10 +146,11 @@ index c48b5ea..81ec2f2 100644
+ private bool should_hide_active_change (Wnck.Window? active_window) {
+ unowned Wnck.Workspace active_workspace = wnck_screen.get_active_workspace ();
+
-+ return ((active_window != null) && !active_window.is_minimized () && right_type (active_window)
-+ && active_window.is_visible_on_workspace (active_workspace)
-+ && (active_window.get_window_type () == Wnck.WindowType.DIALOG) ?
-+ would_intersect_shown_panel (active_window) :
++ return ((active_window != null) && !active_window.is_minimized () && right_type (active_window)
++ && active_window.is_visible_on_workspace (active_workspace)
++ && active_window.is_in_viewport (active_workspace)
++ && (active_window.get_window_type () == Wnck.WindowType.DIALOG) ?
++ would_intersect_shown_panel (active_window) :
+ (in_panel_x_range (active_window) && is_maximized_at_all (active_window)));
+ }
+
@@ -243,6 +245,9 @@ index c48b5ea..81ec2f2 100644
+ this.enter_notify_event.disconnect (show_panel);
+ this.motion_notify_event.disconnect (show_panel);
+ this.leave_notify_event.disconnect (hide_panel);
++ wnck_screen.active_window_changed.disconnect (active_window_changed);
++ wnck_screen.active_workspace_changed.disconnect (active_workspace_changed);
++ wnck_screen.viewports_changed.disconnect (viewports_changed);
+ show_panel ();
+ break;
+ case "Dodge":
@@ -250,12 +255,18 @@ index c48b5ea..81ec2f2 100644
+ this.enter_notify_event.connect (show_panel);
+ this.motion_notify_event.connect (show_panel);
+ this.leave_notify_event.connect (hide_panel);
++ wnck_screen.active_window_changed.connect (active_window_changed);
++ wnck_screen.active_workspace_changed.connect (active_workspace_changed);
++ wnck_screen.viewports_changed.connect (viewports_changed);
+ show_panel ();
+ break;
+ default:
+ this.enter_notify_event.connect (show_panel);
+ this.motion_notify_event.connect (show_panel);
+ this.leave_notify_event.connect (hide_panel);
++ wnck_screen.active_window_changed.disconnect (active_window_changed);
++ wnck_screen.active_workspace_changed.disconnect (active_workspace_changed);
++ wnck_screen.viewports_changed.disconnect (viewports_changed);
+ hide_panel ();
+ break;
+ }