JWM Source Documentation
Data Structures | Functions | Variables
move.c File Reference

Client window move functions. More...

#include "jwm.h"
#include "move.h"
#include "border.h"
#include "client.h"
#include "clientlist.h"
#include "cursor.h"
#include "event.h"
#include "key.h"
#include "outline.h"
#include "pager.h"
#include "screen.h"
#include "status.h"
#include "tray.h"
#include "desktop.h"
#include "settings.h"
#include "timing.h"

Go to the source code of this file.

Data Structures

struct  RectangleType
 

Functions

static void StopMove (ClientNode *np, int doMove, int oldx, int oldy)
 Stop move.
 
static void MoveController (int wasDestroyed)
 Callback for stopping moves.
 
static void DoSnap (ClientNode *np)
 Snap to the screen and/or neighboring windows.
 
static void DoSnapScreen (ClientNode *np)
 Snap to the screen.
 
static void DoSnapBorder (ClientNode *np)
 Snap to window borders.
 
static char ShouldSnap (const ClientNode *np)
 Determine if we should snap to the specified client.
 
static void GetClientRectangle (const ClientNode *np, RectangleType *r)
 Get a rectangle to represent a client window.
 
static char CheckOverlapTopBottom (const RectangleType *a, const RectangleType *b)
 Check for top/bottom overlap.
 
static char CheckOverlapLeftRight (const RectangleType *a, const RectangleType *b)
 Check for left/right overlap.
 
static char CheckLeftValid (const RectangleType *client, const RectangleType *other, const RectangleType *left)
 Check if the current left snap position is valid.
 
static char CheckRightValid (const RectangleType *client, const RectangleType *other, const RectangleType *right)
 Check if the current right snap position is valid.
 
static char CheckTopValid (const RectangleType *client, const RectangleType *other, const RectangleType *top)
 Check if the current top snap position is valid.
 
static char CheckBottomValid (const RectangleType *client, const RectangleType *other, const RectangleType *bottom)
 Check if the current bottom snap position is valid.
 
static void SignalMove (const TimeType *now, int x, int y, Window w, void *data)
 Switch desktops if appropriate.
 
static void UpdateDesktop (const TimeType *now)
 Switch to the specified desktop.
 
char MoveClient (ClientNode *np, int startx, int starty)
 Move a client window.
 
char MoveClientKeyboard (ClientNode *np)
 Move a client window (keyboard or menu initiated).
 

Variables

static char shouldStopMove
 
static char atLeft
 
static char atRight
 
static char atBottom
 
static char atTop
 
static char atSideFirst
 
static ClientNodecurrentClient
 
static TimeType moveTime
 

Detailed Description

Client window move functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file move.c.

Function Documentation

char CheckBottomValid ( const RectangleType client,
const RectangleType other,
const RectangleType bottom 
)
static

Check if the current bottom snap position is valid.

Definition at line 784 of file move.c.

References RectangleType::bottom, RectangleType::left, RectangleType::right, RectangleType::top, and RectangleType::valid.

Referenced by DoSnapBorder().

char CheckLeftValid ( const RectangleType client,
const RectangleType other,
const RectangleType left 
)
static

Check if the current left snap position is valid.

Parameters
clientThe window being moved.
otherA window higher in stacking order than previously check windows.
leftThe top/bottom of the current left snap window.
Returns
1 if the current left snap position is still valid, otherwise 0.

Definition at line 691 of file move.c.

References RectangleType::bottom, RectangleType::left, RectangleType::right, RectangleType::top, and RectangleType::valid.

Referenced by DoSnapBorder().

char CheckOverlapLeftRight ( const RectangleType a,
const RectangleType b 
)
static

Check for left/right overlap.

Definition at line 673 of file move.c.

References RectangleType::left, and RectangleType::right.

Referenced by DoSnapBorder().

char CheckOverlapTopBottom ( const RectangleType a,
const RectangleType b 
)
static

Check for top/bottom overlap.

Definition at line 661 of file move.c.

References RectangleType::bottom, and RectangleType::top.

Referenced by DoSnapBorder().

char CheckRightValid ( const RectangleType client,
const RectangleType other,
const RectangleType right 
)
static

Check if the current right snap position is valid.

Definition at line 722 of file move.c.

References RectangleType::bottom, RectangleType::left, RectangleType::right, RectangleType::top, and RectangleType::valid.

Referenced by DoSnapBorder().

char CheckTopValid ( const RectangleType client,
const RectangleType other,
const RectangleType top 
)
static

Check if the current top snap position is valid.

Definition at line 753 of file move.c.

References RectangleType::bottom, RectangleType::left, RectangleType::right, RectangleType::top, and RectangleType::valid.

Referenced by DoSnapBorder().

void DoSnap ( ClientNode np)
static

Snap to the screen and/or neighboring windows.

Definition at line 459 of file move.c.

References DoSnapBorder(), DoSnapScreen(), settings, SNAP_BORDER, SNAP_SCREEN, and Settings::snapMode.

Referenced by MoveClient().

void DoSnapBorder ( ClientNode np)
static
void DoSnapScreen ( ClientNode np)
static
void GetClientRectangle ( const ClientNode np,
RectangleType r 
)
static
char MoveClient ( ClientNode np,
int  startx,
int  starty 
)
char MoveClientKeyboard ( ClientNode np)
void MoveController ( int  wasDestroyed)
static
char ShouldSnap ( const ClientNode np)
static

Determine if we should snap to the specified client.

Definition at line 628 of file move.c.

References STAT_HIDDEN, STAT_MINIMIZED, ClientNode::state, and ClientState::status.

Referenced by DoSnapBorder().

void SignalMove ( const TimeType now,
int  x,
int  y,
Window  w,
void *  data 
)
static

Switch desktops if appropriate.

Definition at line 815 of file move.c.

References UpdateDesktop().

Referenced by MoveClient(), MoveClientKeyboard(), and StopMove().

void StopMove ( ClientNode np,
int  doMove,
int  oldx,
int  oldy 
)
static
void UpdateDesktop ( const TimeType now)
static

Variable Documentation

char atBottom
static

Definition at line 37 of file move.c.

Referenced by MoveClient(), MoveController(), and UpdateDesktop().

char atLeft
static

Definition at line 35 of file move.c.

Referenced by MoveClient(), MoveController(), and UpdateDesktop().

char atRight
static

Definition at line 36 of file move.c.

Referenced by MoveClient(), MoveController(), and UpdateDesktop().

char atSideFirst
static

Definition at line 39 of file move.c.

Referenced by MoveClient(), and MoveController().

char atTop
static

Definition at line 38 of file move.c.

Referenced by MoveClient(), MoveController(), and UpdateDesktop().

ClientNode* currentClient
static

Definition at line 40 of file move.c.

TimeType moveTime
static

Definition at line 41 of file move.c.

char shouldStopMove
static

Definition at line 34 of file move.c.

Referenced by MoveClient(), MoveClientKeyboard(), and MoveController().

joewing.net / Projects / JWM