X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FScreen.cc;h=dac5d6f8938421579ec4b3b2bb86761f66257a3d;hb=9aaf4f8de762a540780aaef54d15802762dc4130;hp=88cba6733fbc24e2df1fabfc56c6e2294dbf7ff7;hpb=351a06655bdd7d440780b5bc5b255081c888044b;p=chaz%2Fopenbox diff --git a/src/Screen.cc b/src/Screen.cc index 88cba673..dac5d6f8 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -88,7 +88,6 @@ using std::string; #include "Workspace.hh" #include "Workspacemenu.hh" #include "XAtom.hh" -#include "Input.hh" #ifndef FONT_ELEMENT_SIZE #define FONT_ELEMENT_SIZE 50 @@ -314,7 +313,6 @@ BScreen::BScreen(Blackbox *bb, unsigned int scrn) : ScreenInfo(bb, scrn) { // call this again just in case a window we found updates the Strut list updateAvailableArea(); - updateFocusModel(); } @@ -1305,6 +1303,7 @@ void BScreen::updateWorkArea(void) { } xatom->setValue(getRootWindow(), XAtom::net_workarea, XAtom::cardinal, dims, 4 * workspacesList.size()); + delete [] dims; } else xatom->setValue(getRootWindow(), XAtom::net_workarea, XAtom::cardinal, 0, 0); @@ -2184,31 +2183,8 @@ void BScreen::toggleFocusModel(FocusModel model) { void BScreen::updateFocusModel() { - std::for_each(iconList.begin(), iconList.end(), - std::mem_fun(&BlackboxWindow::ungrabButtons)); - std::for_each(windowList.begin(), windowList.end(), - std::mem_fun(&BlackboxWindow::ungrabButtons)); - - if (! resource.sloppy_focus) { - blackbox->getInput()->add(Button1, 0, BInput::WindowClientPress, - BInput::Raise); - blackbox->getInput()->add(Button1, 0, BInput::WindowClientPress, - BInput::Focus); - } else { - if (resource.click_raise) - blackbox->getInput()->add(Button1, 0, BInput::WindowClientPress, - BInput::Raise); - else - blackbox->getInput()->remove(Button1, 0, BInput::WindowClientPress, - BInput::Raise); - blackbox->getInput()->remove(Button1, 0, BInput::WindowClientPress, - BInput::Focus); - } - - std::for_each(iconList.begin(), iconList.end(), - std::mem_fun(&BlackboxWindow::grabButtons)); - std::for_each(windowList.begin(), windowList.end(), - std::mem_fun(&BlackboxWindow::grabButtons)); + std::for_each(workspacesList.begin(), workspacesList.end(), + std::mem_fun(&Workspace::updateFocusModel)); }