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

View File

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

View File

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

View File

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

View File

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

View File

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