diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fluxbox.cc | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 5d7f53b..ded7ea4 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.225 2004/01/16 18:07:40 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.226 2004/01/18 12:42:47 fluxgen Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -827,12 +827,33 @@ void Fluxbox::handleEvent(XEvent * const e) { | |||
827 | FluxboxWindow *win = 0; | 827 | FluxboxWindow *win = 0; |
828 | 828 | ||
829 | if (! winclient) { | 829 | if (! winclient) { |
830 | //!!! TODO | 830 | BScreen *screen = 0; |
831 | BScreen *scr = searchScreen(e->xmaprequest.parent); | 831 | int screen_num; |
832 | if (scr != 0) | 832 | XWindowAttributes attr; |
833 | win = scr->createWindow(e->xmaprequest.window); | 833 | // find screen |
834 | else | 834 | if (XGetWindowAttributes(display(), |
835 | e->xmaprequest.window, | ||
836 | &attr) && attr.screen != 0) { | ||
837 | screen_num = XScreenNumberOfScreen(attr.screen); | ||
838 | |||
839 | // find screen | ||
840 | ScreenList::iterator screen_it = m_screen_list.begin(); | ||
841 | const ScreenList::iterator screen_it_end = m_screen_list.end(); | ||
842 | for (; screen_it != screen_it_end; ++screen_it) { | ||
843 | if ((*screen_it)->screenNumber() == screen_num) { | ||
844 | screen = (*screen_it); | ||
845 | break; | ||
846 | } | ||
847 | } | ||
848 | } | ||
849 | // try with parent if we failed to find screen num | ||
850 | if (screen == 0) | ||
851 | screen = searchScreen(e->xmaprequest.parent); | ||
852 | |||
853 | if (screen == 0) { | ||
835 | cerr<<"Fluxbox Warning! Could not find screen to map window on!"<<endl; | 854 | cerr<<"Fluxbox Warning! Could not find screen to map window on!"<<endl; |
855 | } else | ||
856 | win = screen->createWindow(e->xmaprequest.window); | ||
836 | 857 | ||
837 | } else { | 858 | } else { |
838 | win = winclient->fbwindow(); | 859 | win = winclient->fbwindow(); |