This commit is contained in:
rhp 2001-07-04 04:33:31 +00:00
parent ec00c9852d
commit 73b7323d84
6 changed files with 32 additions and 24 deletions

View File

@ -718,28 +718,33 @@ meta_frames_manage_window (MetaFrames *frames,
int i = 1; int i = 1;
while (i < 4) while (i < 4)
{ {
if (XGrabButton (gdk_display, i, Mod1Mask, int result;
xwindow, False,
ButtonPressMask | ButtonReleaseMask | result = XGrabButton (gdk_display, i, Mod1Mask,
PointerMotionMask | PointerMotionHintMask, xwindow, False,
GrabModeAsync, GrabModeAsync, ButtonPressMask | ButtonReleaseMask |
False, None) != Success) PointerMotionMask | PointerMotionHintMask,
meta_warning ("Failed to grab button %d with Mod1Mask for frame 0x%lx\n", GrabModeAsync, GrabModeAsync,
i, xwindow); False, None);
if (result != Success)
meta_warning ("Failed to grab button %d with Mod1Mask for frame 0x%lx error code %d\n",
i, xwindow, result);
#if 0 #if 0
/* This is just for debugging, since I end up moving /* This is just for debugging, since I end up moving
* the Xnest otherwise ;-) * the Xnest otherwise ;-)
*/ */
if (XGrabButton (gdk_display, i, ControlMask, result = XGrabButton (gdk_display, i, ControlMask,
xwindow, False, xwindow, False,
ButtonPressMask | ButtonReleaseMask | ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | PointerMotionHintMask, PointerMotionMask | PointerMotionHintMask,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
False, None) != Success) False, None);
meta_warning ("Failed to grab button %d with ControlMask for frame 0x%lx\n",
i, xwindow);
if (result != Success)
meta_warning ("Failed to grab button %d with ControlMask for frame 0x%lx error code %d\n",
i, xwindow, result);
#endif #endif
++i; ++i;

View File

@ -196,8 +196,6 @@ find_first_fit (MetaWindow *window,
int *new_y) int *new_y)
{ {
} }
void void
@ -256,8 +254,8 @@ meta_window_place (MetaWindow *window,
int w, h; int w, h;
/* I think whole screen will look nicer than workarea */ /* I think whole screen will look nicer than workarea */
w = WidthOfScreen (window->screen->xscreen); w = window->screen->width;
h = HeightOfScreen (window->screen->xscreen); h = window->screen->height;
x = (w - window->rect.width) / 2; x = (w - window->rect.width) / 2;
y = (y - window->rect.height) / 2; y = (y - window->rect.height) / 2;

View File

@ -1,4 +1,5 @@
#! /bin/bash #! /bin/bash
if test -z "$SCREENS"; then if test -z "$SCREENS"; then
SCREENS=1 SCREENS=1
fi fi

View File

@ -163,6 +163,8 @@ meta_screen_new (MetaDisplay *display,
screen->screen_name = get_screen_name (display, number); screen->screen_name = get_screen_name (display, number);
screen->xscreen = ScreenOfDisplay (xdisplay, number); screen->xscreen = ScreenOfDisplay (xdisplay, number);
screen->xroot = xroot; screen->xroot = xroot;
screen->width = WidthOfScreen (screen->xscreen);
screen->height = HeightOfScreen (screen->xscreen);
if (display->leader_window == None) if (display->leader_window == None)
display->leader_window = XCreateSimpleWindow (display->xdisplay, display->leader_window = XCreateSimpleWindow (display->xdisplay,

View File

@ -36,6 +36,8 @@ struct _MetaScreen
char *screen_name; char *screen_name;
Screen *xscreen; Screen *xscreen;
Window xroot; Window xroot;
int width;
int height;
MetaUI *ui; MetaUI *ui;
MetaWorkspace *active_workspace; MetaWorkspace *active_workspace;

View File

@ -45,8 +45,8 @@ meta_workspace_new (MetaScreen *screen)
*/ */
workspace->workarea.x = 0; workspace->workarea.x = 0;
workspace->workarea.y = 0; workspace->workarea.y = 0;
workspace->workarea.width = WidthOfScreen (screen->xscreen); workspace->workarea.width = screen->width;
workspace->workarea.height = HeightOfScreen (screen->xscreen); workspace->workarea.height = screen->height;
/* Update hint for current number of workspaces */ /* Update hint for current number of workspaces */
set_number_of_spaces_hint (screen); set_number_of_spaces_hint (screen);