fixed toolbar draw bug at startup
This commit is contained in:
parent
7391de5e96
commit
b78255fa1a
2 changed files with 23 additions and 7 deletions
|
@ -22,7 +22,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: Toolbar.cc,v 1.146 2004/06/21 15:23:42 rathnor Exp $
|
// $Id: Toolbar.cc,v 1.147 2004/07/14 23:39:29 fluxgen Exp $
|
||||||
|
|
||||||
#include "Toolbar.hh"
|
#include "Toolbar.hh"
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
|
||||||
|
|
||||||
// show all windows
|
// show all windows
|
||||||
frame.window.showSubwindows();
|
frame.window.showSubwindows();
|
||||||
frame.window.show();
|
// frame.window.show();
|
||||||
|
|
||||||
scrn.resourceManager().unlock();
|
scrn.resourceManager().unlock();
|
||||||
// setup to listen to child events
|
// setup to listen to child events
|
||||||
|
@ -351,7 +351,7 @@ void Toolbar::lower() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Toolbar::reconfigure() {
|
void Toolbar::reconfigure() {
|
||||||
updateVisibleState();
|
// updateVisibleState();
|
||||||
|
|
||||||
if (!doAutoHide() && isHidden())
|
if (!doAutoHide() && isHidden())
|
||||||
toggleHidden();
|
toggleHidden();
|
||||||
|
|
|
@ -22,7 +22,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: fluxbox.cc,v 1.245 2004/06/21 15:23:42 rathnor Exp $
|
// $Id: fluxbox.cc,v 1.246 2004/07/14 23:38:53 fluxgen Exp $
|
||||||
|
|
||||||
#include "fluxbox.hh"
|
#include "fluxbox.hh"
|
||||||
|
|
||||||
|
@ -592,6 +592,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
screen->slit()->show();
|
screen->slit()->show();
|
||||||
#endif // SLIT
|
#endif // SLIT
|
||||||
|
|
||||||
|
|
||||||
} // end init screens
|
} // end init screens
|
||||||
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
XAllowEvents(disp, ReplayPointer, CurrentTime);
|
||||||
|
|
||||||
|
@ -627,6 +628,15 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
// FbTk::ThemeManager::instance().listItems();
|
// FbTk::ThemeManager::instance().listItems();
|
||||||
//
|
//
|
||||||
// m_resourcemanager.dump();
|
// m_resourcemanager.dump();
|
||||||
|
|
||||||
|
#ifdef USE_TOOLBAR
|
||||||
|
// finally, show toolbar
|
||||||
|
Toolbars::iterator toolbar_it = m_toolbars.begin();
|
||||||
|
Toolbars::iterator toolbar_it_end = m_toolbars.end();
|
||||||
|
for (; toolbar_it != toolbar_it_end; ++toolbar_it)
|
||||||
|
(*toolbar_it)->updateVisibleState();
|
||||||
|
#endif // USE_TOOLBAR
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -692,6 +702,7 @@ void Fluxbox::grab() {
|
||||||
void Fluxbox::ungrab() {
|
void Fluxbox::ungrab() {
|
||||||
if (! --m_server_grabs)
|
if (! --m_server_grabs)
|
||||||
XUngrabServer(display());
|
XUngrabServer(display());
|
||||||
|
|
||||||
if (m_server_grabs < 0)
|
if (m_server_grabs < 0)
|
||||||
m_server_grabs = 0;
|
m_server_grabs = 0;
|
||||||
}
|
}
|
||||||
|
@ -860,6 +871,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cerr<<"MapRequest for 0x"<<hex<<e->xmaprequest.window<<dec<<endl;
|
cerr<<"MapRequest for 0x"<<hex<<e->xmaprequest.window<<dec<<endl;
|
||||||
|
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
||||||
WinClient *winclient = searchWindow(e->xmaprequest.window);
|
WinClient *winclient = searchWindow(e->xmaprequest.window);
|
||||||
|
@ -900,9 +912,9 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
win->mapRequestEvent(e->xmaprequest);
|
win->mapRequestEvent(e->xmaprequest);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MapNotify: {
|
case MapNotify:
|
||||||
// handled directly in FluxboxWindow::handleEvent
|
// handled directly in FluxboxWindow::handleEvent
|
||||||
} break;
|
break;
|
||||||
case UnmapNotify:
|
case UnmapNotify:
|
||||||
handleUnmapNotify(e->xunmap);
|
handleUnmapNotify(e->xunmap);
|
||||||
break;
|
break;
|
||||||
|
@ -951,6 +963,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case EnterNotify: {
|
case EnterNotify: {
|
||||||
|
|
||||||
m_last_time = e->xcrossing.time;
|
m_last_time = e->xcrossing.time;
|
||||||
BScreen *screen = 0;
|
BScreen *screen = 0;
|
||||||
|
|
||||||
|
@ -965,6 +978,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case LeaveNotify:
|
case LeaveNotify:
|
||||||
|
|
||||||
m_last_time = e->xcrossing.time;
|
m_last_time = e->xcrossing.time;
|
||||||
break;
|
break;
|
||||||
case Expose:
|
case Expose:
|
||||||
|
@ -995,7 +1009,6 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
case FocusOut:{
|
case FocusOut:{
|
||||||
|
|
||||||
// and here we ignore some window losing the special grab focus
|
// and here we ignore some window losing the special grab focus
|
||||||
if (e->xfocus.mode == NotifyGrab ||
|
if (e->xfocus.mode == NotifyGrab ||
|
||||||
e->xfocus.detail == NotifyPointer ||
|
e->xfocus.detail == NotifyPointer ||
|
||||||
|
@ -1018,6 +1031,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
handleClientMessage(e->xclient);
|
handleClientMessage(e->xclient);
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
|
|
||||||
#ifdef HAVE_RANDR
|
#ifdef HAVE_RANDR
|
||||||
if (e->type == m_randr_event_type) {
|
if (e->type == m_randr_event_type) {
|
||||||
// update root window size in screen
|
// update root window size in screen
|
||||||
|
@ -1966,6 +1980,8 @@ void Fluxbox::setFocusedWindow(WinClient *client) {
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cerr<<"Setting Focused window = "<<client<<endl;
|
cerr<<"Setting Focused window = "<<client<<endl;
|
||||||
|
if (client != 0 && client->fbwindow() != 0)
|
||||||
|
cerr<<"title: "<<client->fbwindow()->title()<<endl;
|
||||||
cerr<<"Current Focused window = "<<m_focused_window<<endl;
|
cerr<<"Current Focused window = "<<m_focused_window<<endl;
|
||||||
cerr<<"------------------"<<endl;
|
cerr<<"------------------"<<endl;
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
Loading…
Reference in a new issue