workspaces are all per-screen now, fix accordingly
2002-10-16 Havoc Pennington <hp@redhat.com> * src/workspace.c: workspaces are all per-screen now, fix accordingly * src/core.c: fix multihead workspace stuff * src/keybindings.c: multihead-rama * src/screen.c (meta_screen_show_desktop): new functions to replace display equivalents * src/display.c (meta_display_get_workspace_by_screen_index): get rid of this (meta_display_get_workspace_by_index): get rid of this (event_callback): handle _NET_SHOWING_DESKTOP message per-screen * src/screen.c (meta_screen_get_workspace_by_index): new function * src/screen.h (struct _MetaScreen): move workspace list, and showing_desktop flag, to be per-screen * src/window.c (window_query_root_pointer): return whether pointer is on window's screen (meta_window_handle_mouse_grab_op_event): don't use coordinates from other screens when updating a window operation on the current screen. I can't believe no one has reported this...
This commit is contained in:

committed by
Havoc Pennington

parent
17ac646f70
commit
337812d51d
15
src/core.c
15
src/core.c
@@ -434,9 +434,8 @@ meta_core_change_workspace (Display *xdisplay,
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
meta_window_change_workspace (window,
|
||||
meta_display_get_workspace_by_screen_index (display,
|
||||
window->screen,
|
||||
new_workspace));
|
||||
meta_screen_get_workspace_by_index (window->screen,
|
||||
new_workspace));
|
||||
}
|
||||
|
||||
int
|
||||
@@ -456,7 +455,7 @@ meta_core_get_active_workspace (Screen *xscreen)
|
||||
|
||||
screen = meta_screen_for_x_screen (xscreen);
|
||||
|
||||
return meta_workspace_screen_index (screen->active_workspace);
|
||||
return meta_workspace_index (screen->active_workspace);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -624,13 +623,17 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
|
||||
char *
|
||||
meta_core_get_workspace_name_with_index (Display *xdisplay,
|
||||
int index)
|
||||
Window xroot,
|
||||
int index)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaScreen *screen;
|
||||
MetaWorkspace *workspace;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
workspace = meta_display_get_workspace_by_index (display, index);
|
||||
screen = meta_display_screen_for_root (display, xroot);
|
||||
g_assert (screen != NULL);
|
||||
workspace = meta_screen_get_workspace_by_index (screen, index);
|
||||
return (workspace != NULL) ? workspace->name : NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user