aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-03-25 06:53:09 (GMT)
committermarkt <markt>2007-03-25 06:53:09 (GMT)
commitcd28ddec7b719fd10f5b7740cf25fa77891526ae (patch)
tree2c033a9a7c6c8edec38d3ee85d6be67e8efe6128 /src/Window.cc
parentaf76b920415642fa04ee32fa1c621e8b36888842 (diff)
downloadfluxbox-cd28ddec7b719fd10f5b7740cf25fa77891526ae.zip
fluxbox-cd28ddec7b719fd10f5b7740cf25fa77891526ae.tar.bz2
added session.screen0.tabs.usePixmap
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc37
1 files changed, 14 insertions, 23 deletions
diff --git a/src/Window.cc b/src/Window.cc
index ce14d08..560bf96 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -42,8 +42,8 @@
42#include "StringUtil.hh" 42#include "StringUtil.hh"
43#include "FocusControl.hh" 43#include "FocusControl.hh"
44#include "Layer.hh" 44#include "Layer.hh"
45#include "IconButton.hh"
45 46
46#include "FbTk/TextButton.hh"
47#include "FbTk/Compose.hh" 47#include "FbTk/Compose.hh"
48#include "FbTk/EventManager.hh" 48#include "FbTk/EventManager.hh"
49#include "FbTk/KeyUtil.hh" 49#include "FbTk/KeyUtil.hh"
@@ -739,7 +739,7 @@ bool FluxboxWindow::removeClient(WinClient &client) {
739 FbTk::EventManager &evm = *FbTk::EventManager::instance(); 739 FbTk::EventManager &evm = *FbTk::EventManager::instance();
740 evm.remove(client.window()); 740 evm.remove(client.window());
741 741
742 FbTk::TextButton *label_btn = m_labelbuttons[&client]; 742 IconButton *label_btn = m_labelbuttons[&client];
743 if (label_btn != 0) { 743 if (label_btn != 0) {
744 frame().removeTab(label_btn); 744 frame().removeTab(label_btn);
745 label_btn = 0; 745 label_btn = 0;
@@ -1015,8 +1015,8 @@ void FluxboxWindow::associateClientWindow(bool use_attrs,
1015 int x, int y, 1015 int x, int y,
1016 unsigned int width, unsigned int height, 1016 unsigned int width, unsigned int height,
1017 int gravity, unsigned int client_bw) { 1017 int gravity, unsigned int client_bw) {
1018 updateTitleFromClient(*m_client); 1018 m_client->updateTitle();
1019 updateIconNameFromClient(*m_client); 1019 m_client->updateIconTitle();
1020 1020
1021 if (use_attrs) 1021 if (use_attrs)
1022 frame().moveResizeForClient(x, y, 1022 frame().moveResizeForClient(x, y,
@@ -1099,21 +1099,12 @@ void FluxboxWindow::reconfigure() {
1099 1099
1100/// update current client title and title in our frame 1100/// update current client title and title in our frame
1101void FluxboxWindow::updateTitleFromClient(WinClient &client) { 1101void FluxboxWindow::updateTitleFromClient(WinClient &client) {
1102 client.updateTitle(); 1102 if (&client == m_client) {
1103 // compare old title with new and see if we need to update 1103 frame().setFocusTitle(client.title());
1104 // graphics 1104 titleSig().notify();
1105 if (m_labelbuttons[&client]->text() != client.title()) {
1106 m_labelbuttons[&client]->setText(client.title());
1107 if (&client == m_client)
1108 frame().setFocusTitle(client.title());
1109 } 1105 }
1110} 1106}
1111 1107
1112/// update icon title from client
1113void FluxboxWindow::updateIconNameFromClient(WinClient &client) {
1114 client.updateIconTitle();
1115}
1116
1117void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { 1108void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) {
1118 const WinClient::MwmHints *hint = client.getMwmHint(); 1109 const WinClient::MwmHints *hint = client.getMwmHint();
1119 1110
@@ -2457,8 +2448,7 @@ void FluxboxWindow::propertyNotifyEvent(WinClient &client, Atom atom) {
2457 // update icon title and then do normal XA_WM_NAME stuff 2448 // update icon title and then do normal XA_WM_NAME stuff
2458 client.updateIconTitle(); 2449 client.updateIconTitle();
2459 case XA_WM_NAME: 2450 case XA_WM_NAME:
2460 updateTitleFromClient(client); 2451 client.updateTitle();
2461 titleSig().notify();
2462 break; 2452 break;
2463 2453
2464 case XA_WM_NORMAL_HINTS: { 2454 case XA_WM_NORMAL_HINTS: {
@@ -4191,13 +4181,14 @@ void FluxboxWindow::ungrabPointer(Time time) {
4191 4181
4192void FluxboxWindow::associateClient(WinClient &client) { 4182void FluxboxWindow::associateClient(WinClient &client) {
4193 4183
4194 FbWinFrame::ButtonId btn = frame().createTab(client.title(), 4184 IconButton *btn = frame().createTab(client);
4195 new SetClientCmd(client),
4196 Fluxbox::instance()->getTabsPadding());
4197
4198 m_labelbuttons[&client] = btn;
4199 4185
4186 FbTk::RefCount<FbTk::Command> setcmd(new SetClientCmd(client));
4187 btn->setOnClick(setcmd, 1);
4188 btn->setTextPadding(Fluxbox::instance()->getTabsPadding());
4189 btn->setPixmap(screen().getTabsUsePixmap());
4200 4190
4191 m_labelbuttons[&client] = btn;
4201 4192
4202 FbTk::EventManager &evm = *FbTk::EventManager::instance(); 4193 FbTk::EventManager &evm = *FbTk::EventManager::instance();
4203 4194