summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-07-14 23:39:29 (GMT)
committerfluxgen <fluxgen>2004-07-14 23:39:29 (GMT)
commitb78255fa1a8040b9948f3749764f5dd03b5f54c8 (patch)
tree53b9d4e7e3932fa9802dc27f546923f0a1e4f4d5
parent7391de5e967263d059602d539ad10902388c7e58 (diff)
downloadfluxbox_lack-b78255fa1a8040b9948f3749764f5dd03b5f54c8.zip
fluxbox_lack-b78255fa1a8040b9948f3749764f5dd03b5f54c8.tar.bz2
fixed toolbar draw bug at startup
-rw-r--r--src/Toolbar.cc6
-rw-r--r--src/fluxbox.cc24
2 files changed, 23 insertions, 7 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 2a39ec0..caa3eca 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.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: Toolbar.cc,v 1.146 2004/06/21 15:23:42 rathnor Exp $ 25// $Id: Toolbar.cc,v 1.147 2004/07/14 23:39:29 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -260,7 +260,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
260 260
261 // show all windows 261 // show all windows
262 frame.window.showSubwindows(); 262 frame.window.showSubwindows();
263 frame.window.show(); 263 // frame.window.show();
264 264
265 scrn.resourceManager().unlock(); 265 scrn.resourceManager().unlock();
266 // setup to listen to child events 266 // setup to listen to child events
@@ -351,7 +351,7 @@ void Toolbar::lower() {
351} 351}
352 352
353void Toolbar::reconfigure() { 353void Toolbar::reconfigure() {
354 updateVisibleState(); 354 // updateVisibleState();
355 355
356 if (!doAutoHide() && isHidden()) 356 if (!doAutoHide() && isHidden())
357 toggleHidden(); 357 toggleHidden();
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 3a93962..1adc314 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.245 2004/06/21 15:23:42 rathnor Exp $ 25// $Id: fluxbox.cc,v 1.246 2004/07/14 23:38:53 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -592,6 +592,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
592 screen->slit()->show(); 592 screen->slit()->show();
593#endif // SLIT 593#endif // SLIT
594 594
595
595 } // end init screens 596 } // end init screens
596 XAllowEvents(disp, ReplayPointer, CurrentTime); 597 XAllowEvents(disp, ReplayPointer, CurrentTime);
597 598
@@ -627,6 +628,15 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
627 // FbTk::ThemeManager::instance().listItems(); 628 // FbTk::ThemeManager::instance().listItems();
628 // 629 //
629 // m_resourcemanager.dump(); 630 // m_resourcemanager.dump();
631
632#ifdef USE_TOOLBAR
633 // finally, show toolbar
634 Toolbars::iterator toolbar_it = m_toolbars.begin();
635 Toolbars::iterator toolbar_it_end = m_toolbars.end();
636 for (; toolbar_it != toolbar_it_end; ++toolbar_it)
637 (*toolbar_it)->updateVisibleState();
638#endif // USE_TOOLBAR
639
630} 640}
631 641
632 642
@@ -692,6 +702,7 @@ void Fluxbox::grab() {
692void Fluxbox::ungrab() { 702void Fluxbox::ungrab() {
693 if (! --m_server_grabs) 703 if (! --m_server_grabs)
694 XUngrabServer(display()); 704 XUngrabServer(display());
705
695 if (m_server_grabs < 0) 706 if (m_server_grabs < 0)
696 m_server_grabs = 0; 707 m_server_grabs = 0;
697} 708}
@@ -860,6 +871,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
860 871
861#ifdef DEBUG 872#ifdef DEBUG
862 cerr<<"MapRequest for 0x"<<hex<<e->xmaprequest.window<<dec<<endl; 873 cerr<<"MapRequest for 0x"<<hex<<e->xmaprequest.window<<dec<<endl;
874
863#endif // DEBUG 875#endif // DEBUG
864 876
865 WinClient *winclient = searchWindow(e->xmaprequest.window); 877 WinClient *winclient = searchWindow(e->xmaprequest.window);
@@ -900,9 +912,9 @@ void Fluxbox::handleEvent(XEvent * const e) {
900 win->mapRequestEvent(e->xmaprequest); 912 win->mapRequestEvent(e->xmaprequest);
901 } 913 }
902 break; 914 break;
903 case MapNotify: { 915 case MapNotify:
904 // handled directly in FluxboxWindow::handleEvent 916 // handled directly in FluxboxWindow::handleEvent
905 } break; 917 break;
906 case UnmapNotify: 918 case UnmapNotify:
907 handleUnmapNotify(e->xunmap); 919 handleUnmapNotify(e->xunmap);
908 break; 920 break;
@@ -951,6 +963,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
951 } 963 }
952 } break; 964 } break;
953 case EnterNotify: { 965 case EnterNotify: {
966
954 m_last_time = e->xcrossing.time; 967 m_last_time = e->xcrossing.time;
955 BScreen *screen = 0; 968 BScreen *screen = 0;
956 969
@@ -965,6 +978,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
965 978
966 } break; 979 } break;
967 case LeaveNotify: 980 case LeaveNotify:
981
968 m_last_time = e->xcrossing.time; 982 m_last_time = e->xcrossing.time;
969 break; 983 break;
970 case Expose: 984 case Expose:
@@ -995,7 +1009,6 @@ void Fluxbox::handleEvent(XEvent * const e) {
995 1009
996 } break; 1010 } break;
997 case FocusOut:{ 1011 case FocusOut:{
998
999 // and here we ignore some window losing the special grab focus 1012 // and here we ignore some window losing the special grab focus
1000 if (e->xfocus.mode == NotifyGrab || 1013 if (e->xfocus.mode == NotifyGrab ||
1001 e->xfocus.detail == NotifyPointer || 1014 e->xfocus.detail == NotifyPointer ||
@@ -1018,6 +1031,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
1018 handleClientMessage(e->xclient); 1031 handleClientMessage(e->xclient);
1019 break; 1032 break;
1020 default: { 1033 default: {
1034
1021#ifdef HAVE_RANDR 1035#ifdef HAVE_RANDR
1022 if (e->type == m_randr_event_type) { 1036 if (e->type == m_randr_event_type) {
1023 // update root window size in screen 1037 // update root window size in screen
@@ -1966,6 +1980,8 @@ void Fluxbox::setFocusedWindow(WinClient *client) {
1966 } 1980 }
1967#ifdef DEBUG 1981#ifdef DEBUG
1968 cerr<<"Setting Focused window = "<<client<<endl; 1982 cerr<<"Setting Focused window = "<<client<<endl;
1983 if (client != 0 && client->fbwindow() != 0)
1984 cerr<<"title: "<<client->fbwindow()->title()<<endl;
1969 cerr<<"Current Focused window = "<<m_focused_window<<endl; 1985 cerr<<"Current Focused window = "<<m_focused_window<<endl;
1970 cerr<<"------------------"<<endl; 1986 cerr<<"------------------"<<endl;
1971#endif // DEBUG 1987#endif // DEBUG