diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-06-02 00:30:55 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-06-02 00:30:55 +0000 |
| commit | a7db565c75f316fd04ccb04004b58f6378af63c9 (patch) | |
| tree | 4652e4cc35c32a0bdbd3ec31bc033f7f1d20cf6d /src/blackbox.cc | |
| parent | f0c2fa18bef6a0f74d607eb390b98ccfbd8d778f (diff) | |
window-to-window snapping is now a run-time option.
window-corner snapping added, and also is a run-time option.
Diffstat (limited to 'src/blackbox.cc')
| -rw-r--r-- | src/blackbox.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/blackbox.cc b/src/blackbox.cc index 72bbf723..266d0e73 100644 --- a/src/blackbox.cc +++ b/src/blackbox.cc @@ -896,6 +896,18 @@ void Blackbox::shutdown(void) { } +void Blackbox::saveWindowToWindowSnap(bool s) { + resource.window_to_window_snap = s; + config.setValue("session.windowToWindowSnap", resource.window_to_window_snap); +} + + +void Blackbox::saveWindowCornerSnap(bool s) { + resource.window_corner_snap = s; + config.setValue("session.windowCornerSnap", resource.window_corner_snap); +} + + /* * Save all values as they are so that the defaults will be written to the rc * file @@ -913,6 +925,8 @@ void Blackbox::save_rc(void) { config.setValue("session.cacheMax", resource.cache_max); config.setValue("session.styleFile", resource.style_file); config.setValue("session.titlebarLayout", resource.titlebar_layout); + saveWindowToWindowSnap(resource.window_to_window_snap); + saveWindowCornerSnap(resource.window_corner_snap); std::for_each(screenList.begin(), screenList.end(), std::mem_fun(&BScreen::save_rc)); @@ -960,6 +974,14 @@ void Blackbox::load_rc(void) { if (! config.getValue("session.titlebarLayout", resource.titlebar_layout)) resource.titlebar_layout = "ILMC"; + + if (! config.getValue("session.windowToWindowSnap", + resource.window_to_window_snap)) + resource.window_to_window_snap = true; + + if (! config.getValue("session.windowCornerSnap", + resource.window_corner_snap)) + resource.window_corner_snap = true; } |
