1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-03 23:05:46 +01:00

*** empty log message ***

This commit is contained in:
kojima
2001-01-16 16:08:40 +00:00
parent fea4c4c84e
commit b4851afbb7
12 changed files with 52 additions and 13 deletions

View File

@@ -427,17 +427,38 @@ wMaximizeWindow(WWindow *wwin, int directions)
{
int new_width, new_height, new_x, new_y;
WArea usableArea = wwin->screen_ptr->totalUsableArea;
WArea totalArea;
if (WFLAGP(wwin, no_resizable))
return;
totalArea.x1 = 0;
totalArea.y1 = 0;
totalArea.x2 = wwin->screen_ptr->scr_width;
totalArea.y2 = wwin->screen_ptr->scr_height;
#ifdef XINERAMA
if (wwin->screen_ptr->xine_count > 0
&& !(directions & MAX_IGNORE_XINERAMA)) {
WScreen *scr = wwin->screen_ptr;
WMRect rect;
rect = wGetRectForHead(scr, wGetHeadForWindow(wwin));
totalArea.x1 = rect.pos.x;
totalArea.y1 = rect.pos.y;
totalArea.x2 = totalArea.x1 + rect.size.width;
totalArea.y2 = totalArea.y1 + rect.size.height;
usableArea.x1 = WMAX(totalArea.x1, usableArea.x1);
usableArea.y1 = WMAX(totalArea.y1, usableArea.y1);
usableArea.x2 = WMIN(totalArea.x2, usableArea.x2);
usableArea.y2 = WMIN(totalArea.y2, usableArea.y2);
}
#endif /* XINERAMA */
if (WFLAGP(wwin, full_maximize)) {
usableArea.x1 = 0;
usableArea.y1 = 0;
usableArea.x2 = wwin->screen_ptr->scr_width;
usableArea.y2 = wwin->screen_ptr->scr_height;
usableArea = totalArea;
}
if (wwin->flags.shaded) {

View File

@@ -26,7 +26,7 @@
#define MAX_HORIZONTAL 1
#define MAX_VERTICAL 2
#define MAX_IGNORE_XINERAMA 4
void wSetFocusTo(WScreen *scr, WWindow *wwin);

View File

@@ -1361,6 +1361,7 @@ wShowLegalPanel(WScreen *scr)
panel->licenseL = WMCreateLabel(panel->win);
WMSetLabelWraps(panel->licenseL, True);
WMResizeWidget(panel->licenseL, 400, 230);
WMMoveWidget(panel->licenseL, 10, 10);
WMSetLabelTextAlignment(panel->licenseL, WALeft);

View File

@@ -1,7 +1,7 @@
/*
* Window Maker window manager
*
* Copyright (c) 1997, 1998 Alfredo K. Kojima
* Copyright (c) 1997-2001 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,6 +28,10 @@
#include <proplist.h>
#ifdef XINERAMA
#include <X11/Xinerama.h>
#endif
#define WTB_LEFT 0
#define WTB_RIGHT 1
@@ -89,6 +93,12 @@ typedef struct _WScreen {
Visual *w_visual;
int w_depth;
Colormap w_colormap; /* our colormap */
#ifdef XINERAMA
XineramaScreenInfo *xine_screens;
int xine_count; /* 0 means not active */
int xine_primary_screen; /* main working screen */
#endif
Window no_focus_win; /* window to get focus when nobody
* else can do it */