Skip to content

Commit 2de8f3d

Browse files
committed
Merge pull request Guake#7 from guilhem/patch-1
Manage unity dock
2 parents 20105e1 + 87048c1 commit 2de8f3d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/guake

+12
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,18 @@ class Guake(SimpleGladeApp):
830830
# future we might create a field to select which monitor you
831831
# wanna use
832832
window_rect = screen.get_monitor_geometry(0)
833+
if os.environ.get('DESKTOP_SESSION') == "ubuntu":
834+
unity_hide = self.client.get_int(KEY('/apps/compiz-1/plugins/' \
835+
'unityshell/screen0/options/launcher_hide_mode'))
836+
# launcher_hide_mode = 1 => autohide
837+
if unity_hide != 1:
838+
# Size of the icons for Unity in Ubuntu <= 12.04
839+
# TODO Ubuntu 12.10 use dconf :
840+
# /org/compiz/profiles/unity/plugins/unityshell/icon-size
841+
unity_icon_size = self.client.get_int(KEY('/apps/compiz-1/' \
842+
'plugins/unityshell/screen0/options/icon_size'))
843+
unity_dock = unity_icon_size + 17
844+
window_rect.width = window_rect.width - unity_dock
833845
total_width = window_rect.width
834846
window_rect.height = window_rect.height * height / 100
835847
window_rect.width = window_rect.width * width / 100

0 commit comments

Comments
 (0)