summaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-06-07 00:24:02 +0000
committerDana Jansens <danakj@orodu.net>2002-06-07 00:24:02 +0000
commite90fafd2fd907a81bdc60ad8b6de35fc1595cdff (patch)
tree38e3e6394d5aab654ad283e2d7351000c57263af /src/Screen.cc
parentaad50046de0b1971f869ee95a0f80267c74a1fd3 (diff)
fix off-by-ones in window-to-window snapping. move the property from the blackbox class to the screen class.
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 512475c8..ba394bc9 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -424,6 +424,20 @@ void BScreen::saveHideToolbar(bool h) {
}
+void BScreen::saveWindowToWindowSnap(bool s) {
+ resource.window_to_window_snap = s;
+ config->setValue(screenstr + "windowToWindowSnap",
+ resource.window_to_window_snap);
+}
+
+
+void BScreen::saveWindowCornerSnap(bool s) {
+ resource.window_corner_snap = s;
+ config->setValue(screenstr + "windowCornerSnap",
+ resource.window_corner_snap);
+}
+
+
void BScreen::saveWorkspaces(unsigned int w) {
resource.workspaces = w;
config->setValue(screenstr + "workspaces", resource.workspaces);
@@ -510,6 +524,8 @@ void BScreen::save_rc(void) {
saveFocusNew(resource.focus_new);
saveFocusLast(resource.focus_last);
saveHideToolbar(resource.hide_toolbar);
+ saveWindowToWindowSnap(resource.window_to_window_snap);
+ saveWindowCornerSnap(resource.window_corner_snap);
saveWorkspaces(resource.workspaces);
savePlacementPolicy(resource.placement_policy);
saveEdgeSnapThreshold(resource.edge_snap_threshold);
@@ -549,6 +565,14 @@ void BScreen::load_rc(void) {
if (! config->getValue(screenstr + "hideToolbar", resource.hide_toolbar))
resource.hide_toolbar = false;
+ if (! config->getValue(screenstr + "windowToWindowSnap",
+ resource.window_to_window_snap))
+ resource.window_to_window_snap = true;
+
+ if (! config->getValue(screenstr + "windowCornerSnap",
+ resource.window_corner_snap))
+ resource.window_corner_snap = true;
+
if (! config->getValue(screenstr + "imageDither", b))
b = true;
image_control->setDither(b);