Skip to content

Commit

Permalink
Fix center window on opening not working
Browse files Browse the repository at this point in the history
  • Loading branch information
zhrexl committed Aug 9, 2021
1 parent d17bfb6 commit 1ddf902
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/maindialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ private Q_SLOTS:
void on_fixed_monitor_valueChanged(int newValue);
void on_focus_new_toggled(bool checked);
void on_place_mouse_toggled(bool checked);
void on_place_center_toggled(bool checked);

void on_place_active_popup_currentIndexChanged(int index);
void on_primary_monitor_popup_currentIndexChanged(int index);
Expand Down
5 changes: 4 additions & 1 deletion src/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern RrInstance* rrinst; // defined in obconf-qt.cpp
void MainDialog::windows_setup_tab() {
gchar* s;
ui.focus_new->setChecked(tree_get_bool("focus/focusNew", TRUE));
ui.place_center->setChecked(tree_get_bool("placement/center",TRUE));

s = tree_get_string("placement/policy", "Smart");
ui.place_mouse->setChecked(!g_ascii_strcasecmp(s, "UnderMouse"));
Expand Down Expand Up @@ -111,7 +112,9 @@ void MainDialog::on_fixed_monitor_valueChanged(int newValue) {
void MainDialog::on_focus_new_toggled(bool checked) {
tree_set_bool("focus/focusNew", checked);
}

void MainDialog::on_place_center_toggled(bool checked){
tree_set_bool("placement/center", checked);
}
void MainDialog::on_place_mouse_toggled(bool checked) {
tree_set_string("placement/policy",
(checked ?
Expand Down

0 comments on commit 1ddf902

Please sign in to comment.