mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
...
This commit is contained in:
parent
ec00c9852d
commit
73b7323d84
37
src/frames.c
37
src/frames.c
@ -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;
|
||||
|
@ -195,9 +195,7 @@ find_first_fit (MetaWindow *window,
|
||||
int *new_x,
|
||||
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;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
if test -z "$SCREENS"; then
|
||||
SCREENS=1
|
||||
fi
|
||||
|
@ -163,7 +163,9 @@ 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,
|
||||
screen->xroot,
|
||||
|
@ -36,6 +36,8 @@ struct _MetaScreen
|
||||
char *screen_name;
|
||||
Screen *xscreen;
|
||||
Window xroot;
|
||||
int width;
|
||||
int height;
|
||||
MetaUI *ui;
|
||||
|
||||
MetaWorkspace *active_workspace;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user