Skip to content

Commit 6365649

Browse files
Omar Zeidanraveit65
authored andcommitted
Fixes move_to_center moving window between monitors
1 parent 9ed8fa4 commit 6365649

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core/keybindings.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2652,12 +2652,16 @@ handle_move_to_center (MetaDisplay *display,
26522652
XEvent *event,
26532653
MetaKeyBinding *binding)
26542654
{
2655+
const MetaXineramaScreenInfo* current;
26552656
MetaRectangle work_area;
26562657
MetaRectangle outer;
26572658
int orig_x, orig_y;
26582659
int frame_width, frame_height;
26592660

2660-
meta_window_get_work_area_all_xineramas (window, &work_area);
2661+
current = meta_screen_get_xinerama_for_window(screen, window);
2662+
meta_window_get_work_area_for_xinerama (window,
2663+
current->number,
2664+
&work_area);
26612665
meta_window_get_outer_rect (window, &outer);
26622666
meta_window_get_position (window, &orig_x, &orig_y);
26632667

0 commit comments

Comments
 (0)