Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker moving after screen restart on Mate desktop. #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions lib/PositionManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace Plank
screen.composited_changed.connect (screen_composited_changed);

// NOTE don't call update_monitor_geo to avoid a double-call of dockwindow.set_size on startup
if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU)) {
if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU | XdgSessionDesktop.MATE)) {
screen.get_monitor_geometry (find_monitor_number (screen, controller.prefs.Monitor), out monitor_geo);
} else {
monitor_geo = screen.get_monitor_workarea (find_monitor_number (screen, controller.prefs.Monitor));
Expand Down Expand Up @@ -137,10 +137,14 @@ namespace Plank
void screen_changed (Gdk.Screen screen)
{
var old_monitor_geo = monitor_geo;

Logger.verbose ("screen_changed()");

if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU)) {
if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU | XdgSessionDesktop.MATE)) {
Logger.verbose ("Gnome, Ubuntu or Mate.");
screen.get_monitor_geometry (find_monitor_number (screen, controller.prefs.Monitor), out monitor_geo);
} else {
Logger.verbose ("Another XdgSessionDesktop env.");
monitor_geo = screen.get_monitor_workarea (find_monitor_number (screen, controller.prefs.Monitor));
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Services/Environment.vala
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ namespace Plank

public static bool environment_is_session_desktop (XdgSessionDesktop type)
{
return (type in session_desktop);
return (type & session_desktop) > 0;
}

public static bool environment_is_session_type (XdgSessionType type)
Expand Down
2 changes: 1 addition & 1 deletion lib/Widgets/HoverWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace Plank
{
unowned Gdk.Screen screen = get_screen ();
Gdk.Rectangle monitor;
if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU)) {
if (environment_is_session_desktop (XdgSessionDesktop.GNOME | XdgSessionDesktop.UBUNTU | XdgSessionDesktop.MATE)) {
screen.get_monitor_geometry (screen.get_monitor_at_point (x, y), out monitor);
} else {
monitor = screen.get_monitor_workarea (screen.get_monitor_at_point (x, y));
Expand Down