34#include "functions_defs.h"
84 x =
evp->xbutton.x_root;
85 y =
evp->xbutton.y_root;
145 if(
Scr->OpaqueResizeThreshold >= 1000) {
146 Scr->OpaqueResize =
true;
155 const unsigned long scrsz =
Scr->rootw *
Scr->rooth;
157 Scr->OpaqueResize =
false;
160 Scr->OpaqueResize =
true;
165 Scr->OpaqueResize =
false;
190 cursor = (
Scr->BorderCursors
243 if(!
Scr->OpaqueResize) {
265 if(!
Scr->OpaqueResize)
406 if(
Scr->OpaqueResize)
416 if(
Scr->BorderCursors && (cursor !=
tmp_win->curcurs)) {
552 if(
Scr->BorderCursors && (cursor !=
tmp_win->curcurs)) {
617 2,
Scr->DefaultC,
off,
false,
false);
619 FB(
Scr->DefaultC.fore,
Scr->DefaultC.back);
621 Scr->NormalGC,
Scr->SizeStringOffset,
666 (
long)
tmp_win->iconmgrp->columns)
671 if(!
Scr->NoRaiseResize) {
730#define makemult(a,b) ((b==1) ? (a) : (((int)((a)/(b))) * (b)) )
1168 if(
tmp_win->savegeometry.width == (
unsigned int) - 1) {
1173 w =
tmp_win->savegeometry.width;
1174 h =
tmp_win->savegeometry.height;
1191 "%s: Bad argument to f.changesize: \"%s\" (pattern \"640x480\")\n",
1214 "%s: Bad argument to f.changesize: \"%s\" (sizechange missing)\n",
1222 "%s: Bad argument to f.changesize: \"%s\" (sizechange not a number)\n",
1239 (
unsigned int *)&
mr);
1257 (
unsigned int *)&
mr);
1277 (
unsigned int *)&
mr);
1297 (
unsigned int *)&
mr);
1306 fprintf(
stderr,
"%s: Bad argument to f.changesize: \"%s\"\n (unknown border)",
void UninstallRootColormap(void)
void InstallRootColormap(void)
#define FB(fix_fore, fix_back)
void Draw3DBorder(Window w, int x, int y, int width, int height, int bw, ColorPair cp, ButtonState state, bool fill, bool forcebw)
bool DispatchEvent2(void)
void EwmhSet_NET_WM_STATE(TwmWindow *twm_win, int changes)
#define EWMH_STATE_MAXIMIZED_VERT
void PackIconManager(IconMgr *ip)
void OtpSetAflag(TwmWindow *twm_win, unsigned flag)
void OtpRestackWindow(TwmWindow *twm_win)
void OtpClearAflag(TwmWindow *twm_win, unsigned flag)
void OtpRaise(TwmWindow *twm_win, WinType wintype)
RArea RAreaInvalid(void)
Return a facially-invalid RArea.
RArea RAreaNew(int x, int y, int width, int height)
Construct an RArea from given components.
bool RAreaIsValid(const RArea *self)
Is an RArea facially valid?
RAreaList * RAreaListNew(int cap,...)
Create an RAreaList from a set of RArea's.
void RLayoutFree(RLayout *self)
Clean up and free an RLayout.
RArea RLayoutFullVert1(const RLayout *self, const RArea *area)
Figure the best way to stretch an area vertically without crossing monitors.
int RLayoutFindBottomEdge(const RLayout *self, const RArea *area)
Find the bottom of the top stripe of self that area fits into.
int RLayoutFindRightEdge(const RLayout *self, const RArea *area)
Find the right edge of the left-most stripe of self that area fits into.
RArea RLayoutFullHoriz1(const RLayout *self, const RArea *area)
Figure the best way to stretch an area horizontally without crossing monitors.
int RLayoutFindMonitorTopEdge(const RLayout *self, const RArea *area)
Find the top edge of the bottom-most monitor that contains the most of a given RArea.
int RLayoutFindMonitorRightEdge(const RLayout *self, const RArea *area)
Find the right edge of the left-most monitor that contains the most of a given RArea.
int RLayoutFindLeftEdge(const RLayout *self, const RArea *area)
Find the left edge of the right-most stripe of self that area fits into.
int RLayoutFindMonitorBottomEdge(const RLayout *self, const RArea *area)
Find the bottom edge of the top-most monitor that contains the most of a given RArea.
RLayout * RLayoutNew(RAreaList *monitors)
Create an RLayout for a given set of monitors.
RArea RLayoutFull1(const RLayout *self, const RArea *area)
Figure the best way to resize an area to fill one monitor.
int RLayoutFindTopEdge(const RLayout *self, const RArea *area)
Find the top of the bottom stripe of self that area fits into.
RArea RLayoutFull(const RLayout *self, const RArea *area)
Figure the best way to stretch an area across the largest horizontal and vertical space it can from i...
RArea RLayoutFullHoriz(const RLayout *self, const RArea *area)
Figure the best way to stretch an area across the full horizontal width of an RLayout.
RArea RLayoutFullVert(const RLayout *self, const RArea *area)
Figure the best way to stretch an area across the full vertical height of an RLayout.
int RLayoutFindMonitorLeftEdge(const RLayout *self, const RArea *area)
Find the left edge of the right-most monitor that contains the most of a given RArea.
#define SIZE_VINDENT
Internal padding in the size window.
#define SIZE_HINDENT
Internal padding in the size window.
A particular extent of space.
The layout of our display.
Info and control for every X Window we take over.
static int min(int a, int b)
void SetupWindow(TwmWindow *tmp_win, int x, int y, int w, int h, int bw)
void MoveOutline(Window root, int x, int y, int width, int height, int bw, int th)
static void DisplaySize(TwmWindow *tmp_win, int width, int height)
void ChangeSize(char *in_string, TwmWindow *tmp_win)
void StartResize(XEvent *evp, TwmWindow *tmp_win, bool fromtitlebar, bool from3dborder)
void MenuStartResize(TwmWindow *tmp_win, int x, int y, int w, int h)
void ConstrainSize(TwmWindow *tmp_win, unsigned int *widthp, unsigned int *heightp)
void unzoom(TwmWindow *tmp_win)
void restoregeometry(TwmWindow *tmp_win)
static void do_auto_clamp(TwmWindow *tmp_win, XEvent *evp)
static unsigned int dragWidth
void resizeFromCenter(Window w, TwmWindow *tmp_win)
void OpaqueResizeSize(TwmWindow *tmp_win)
void MenuEndResize(TwmWindow *tmp_win)
static unsigned int dragHeight
void AddEndResize(TwmWindow *tmp_win)
void AddStartResize(TwmWindow *tmp_win, int x, int y, int w, int h)
void DoResize(int x_root, int y_root, TwmWindow *tmp_win)
static unsigned int resizeGrabMask
void MenuDoResize(int x_root, int y_root, TwmWindow *tmp_win)
void fullzoom(TwmWindow *tmp_win, int func)
void savegeometry(TwmWindow *tmp_win)
void MoveResizeSizeWindow(int x, int y, unsigned int width, unsigned int height)
TwmWindow * GetTwmWindow(Window w)
void WMapRaise(TwmWindow *win)