fixed multiple screen issue...again
This commit is contained in:
parent
0fbb0bfe8b
commit
b29b4adc4a
1 changed files with 11 additions and 4 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: SystemTray.cc,v 1.14 2004/09/01 00:05:52 fluxgen Exp $
|
// $Id: SystemTray.cc,v 1.15 2004/09/01 08:46:55 fluxgen Exp $
|
||||||
|
|
||||||
#include "SystemTray.hh"
|
#include "SystemTray.hh"
|
||||||
|
|
||||||
|
@ -260,11 +260,18 @@ void SystemTray::addClient(Window win) {
|
||||||
if (it != m_clients.end())
|
if (it != m_clients.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FbTk::FbWindow *traywin = new TrayWindow(win);
|
// make sure we have the same screen number
|
||||||
if (traywin->screenNumber() != window().screenNumber()) {
|
XWindowAttributes attr;
|
||||||
delete traywin;
|
attr.screen = 0;
|
||||||
|
if (XGetWindowAttributes(FbTk::App::instance()->display(),
|
||||||
|
win, &attr) != 0 &&
|
||||||
|
attr.screen != 0 &&
|
||||||
|
XScreenNumberOfScreen(attr.screen) != window().screenNumber()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FbTk::FbWindow *traywin = new TrayWindow(win);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cerr<<"SystemTray::"<<__FUNCTION__<<": 0x"<<hex<<win<<dec<<endl;
|
cerr<<"SystemTray::"<<__FUNCTION__<<": 0x"<<hex<<win<<dec<<endl;
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
Loading…
Reference in a new issue