all repos — fluxbox @ 40abe448b1a80325be090621a4f5fcef8698ca61

custom fork of the fluxbox windowmanager

multiple screen fix, checks for screen number
fluxgen fluxgen
commit

40abe448b1a80325be090621a4f5fcef8698ca61

parent

47160bdb31c8cd8f9a0cc2451349d628588c547e

1 files changed, 16 insertions(+), 4 deletions(-)

jump to
M src/SystemTray.ccsrc/SystemTray.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: SystemTray.cc,v 1.12 2004/06/27 21:47:16 fluxgen Exp $ +// $Id: SystemTray.cc,v 1.13 2004/08/31 23:18:29 fluxgen Exp $ #include "SystemTray.hh"

@@ -51,12 +51,20 @@ }

// client message is the only thing we care about bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient) { + // must be on the same screen + if ((screen && screen->screenNumber() != m_tray.window().screenNumber()) || + (winclient && winclient->screenNumber() != m_tray.window().screenNumber()) ) + return false; return m_tray.clientMessage(ce); } void initForScreen(BScreen &screen) { }; void setupFrame(FluxboxWindow &win) { }; void setupClient(WinClient &winclient) { + // must be on the same screen + if (winclient.screenNumber() != m_tray.window().screenNumber()) + return; + // we dont want a managed window if (winclient.fbwindow() != 0) return;

@@ -248,13 +256,15 @@ ClientList::iterator it = findClient(win);

if (it != m_clients.end()) return; + FbTk::FbWindow *traywin = new TrayWindow(win); + if (traywin->screenNumber() != window().screenNumber()) { + delete traywin; + return; + } #ifdef DEBUG cerr<<"SystemTray::"<<__FUNCTION__<<": 0x"<<hex<<win<<dec<<endl; #endif // DEBUG - if (m_clients.empty()) - show(); - FbTk::FbWindow *traywin = new TrayWindow(win); m_clients.push_back(traywin); FbTk::EventManager::instance()->add(*this, win); FbTk::EventManager::instance()->addParent(*this, window());

@@ -262,6 +272,8 @@ XChangeSaveSet(FbTk::App::instance()->display(), win, SetModeInsert);

traywin->reparent(m_window, 0, 0); traywin->show(); + if (m_clients.empty()) + show(); #ifdef DEBUG cerr<<"number of clients = "<<m_clients.size()<<endl; #endif // DEBUG