mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
differentiate between movement towards an edge and movement away from one.
2005-11-19 Elijah Newren <newren@gmail.com> * src/edge-resistance.c (apply_edge_resistance): differentiate between movement towards an edge and movement away from one. Pick smaller constants for movement away from an edge.
This commit is contained in:
parent
dfbec3a4c3
commit
075d6d34db
@ -1,3 +1,9 @@
|
|||||||
|
2005-11-19 Elijah Newren <newren@gmail.com>
|
||||||
|
|
||||||
|
* src/edge-resistance.c (apply_edge_resistance): differentiate
|
||||||
|
between movement towards an edge and movement away from one. Pick
|
||||||
|
smaller constants for movement away from an edge.
|
||||||
|
|
||||||
2005-11-19 Elijah Newren <newren@gmail.com>
|
2005-11-19 Elijah Newren <newren@gmail.com>
|
||||||
|
|
||||||
* configure.in: post-release version bump to 2.13.3
|
* configure.in: post-release version bump to 2.13.3
|
||||||
|
@ -334,15 +334,21 @@ apply_edge_resistance (MetaWindow *window,
|
|||||||
gboolean increasing = new_pos > old_pos;
|
gboolean increasing = new_pos > old_pos;
|
||||||
int increment = increasing ? 1 : -1;
|
int increment = increasing ? 1 : -1;
|
||||||
|
|
||||||
const int PIXEL_DISTANCE_THRESHOLD_WINDOW = 16;
|
const int PIXEL_DISTANCE_THRESHOLD_TOWARDS_WINDOW = 16;
|
||||||
const int PIXEL_DISTANCE_THRESHOLD_XINERAMA = 32;
|
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_WINDOW = 8;
|
||||||
const int PIXEL_DISTANCE_THRESHOLD_SCREEN = 32;
|
const int PIXEL_DISTANCE_THRESHOLD_TOWARDS_XINERAMA = 32;
|
||||||
|
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_XINERAMA = 8;
|
||||||
|
const int PIXEL_DISTANCE_THRESHOLD_TOWARDS_SCREEN = 32;
|
||||||
|
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_SCREEN = 8;
|
||||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_WINDOW = 0;
|
const int TIMEOUT_RESISTANCE_LENGTH_MS_WINDOW = 0;
|
||||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_XINERAMA = 100;
|
const int TIMEOUT_RESISTANCE_LENGTH_MS_XINERAMA = 100;
|
||||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_SCREEN = 750;
|
const int TIMEOUT_RESISTANCE_LENGTH_MS_SCREEN = 750;
|
||||||
const int KEYBOARD_BUILDUP_THRESHOLD_WINDOW = 16;
|
const int KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_WINDOW = 16;
|
||||||
const int KEYBOARD_BUILDUP_THRESHOLD_XINERAMA = 24;
|
const int KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_WINDOW = 16;
|
||||||
const int KEYBOARD_BUILDUP_THRESHOLD_SCREEN = 32;
|
const int KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_XINERAMA = 24;
|
||||||
|
const int KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_XINERAMA = 16;
|
||||||
|
const int KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_SCREEN = 32;
|
||||||
|
const int KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_SCREEN = 16;
|
||||||
|
|
||||||
/* Quit if no movement was specified */
|
/* Quit if no movement was specified */
|
||||||
if (old_pos == new_pos)
|
if (old_pos == new_pos)
|
||||||
@ -404,13 +410,22 @@ apply_edge_resistance (MetaWindow *window,
|
|||||||
switch (edge->edge_type)
|
switch (edge->edge_type)
|
||||||
{
|
{
|
||||||
case META_EDGE_WINDOW:
|
case META_EDGE_WINDOW:
|
||||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_WINDOW;
|
if (movement_towards_edge (edge->side_type, increment))
|
||||||
|
resistance = KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_WINDOW;
|
||||||
|
else
|
||||||
|
resistance = KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_WINDOW;
|
||||||
break;
|
break;
|
||||||
case META_EDGE_XINERAMA:
|
case META_EDGE_XINERAMA:
|
||||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_XINERAMA;
|
if (movement_towards_edge (edge->side_type, increment))
|
||||||
|
resistance = KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_XINERAMA;
|
||||||
|
else
|
||||||
|
resistance = KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_XINERAMA;
|
||||||
break;
|
break;
|
||||||
case META_EDGE_SCREEN:
|
case META_EDGE_SCREEN:
|
||||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_SCREEN;
|
if (movement_towards_edge (edge->side_type, increment))
|
||||||
|
resistance = KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_SCREEN;
|
||||||
|
else
|
||||||
|
resistance = KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_SCREEN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,13 +533,22 @@ apply_edge_resistance (MetaWindow *window,
|
|||||||
switch (edge->edge_type)
|
switch (edge->edge_type)
|
||||||
{
|
{
|
||||||
case META_EDGE_WINDOW:
|
case META_EDGE_WINDOW:
|
||||||
threshold = PIXEL_DISTANCE_THRESHOLD_WINDOW;
|
if (movement_towards_edge (edge->side_type, increment))
|
||||||
|
threshold = PIXEL_DISTANCE_THRESHOLD_TOWARDS_WINDOW;
|
||||||
|
else
|
||||||
|
threshold = PIXEL_DISTANCE_THRESHOLD_AWAYFROM_WINDOW;
|
||||||
break;
|
break;
|
||||||
case META_EDGE_XINERAMA:
|
case META_EDGE_XINERAMA:
|
||||||
threshold = PIXEL_DISTANCE_THRESHOLD_XINERAMA;
|
if (movement_towards_edge (edge->side_type, increment))
|
||||||
|
threshold = PIXEL_DISTANCE_THRESHOLD_TOWARDS_XINERAMA;
|
||||||
|
else
|
||||||
|
threshold = PIXEL_DISTANCE_THRESHOLD_AWAYFROM_XINERAMA;
|
||||||
break;
|
break;
|
||||||
case META_EDGE_SCREEN:
|
case META_EDGE_SCREEN:
|
||||||
threshold = PIXEL_DISTANCE_THRESHOLD_SCREEN;
|
if (movement_towards_edge (edge->side_type, increment))
|
||||||
|
threshold = PIXEL_DISTANCE_THRESHOLD_TOWARDS_SCREEN;
|
||||||
|
else
|
||||||
|
threshold = PIXEL_DISTANCE_THRESHOLD_AWAYFROM_SCREEN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user