aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-15 19:34:34 (GMT)
committerfluxgen <fluxgen>2003-06-15 19:34:34 (GMT)
commit7e04a570e3c1aa6c462041a6fc42d12f01a1f3a4 (patch)
tree488829b176930b74290571b9028de3c962ef09ec /src
parent2b1bc6565eb2f0a3787df94a248eb565f3722085 (diff)
downloadfluxbox_paul-7e04a570e3c1aa6c462041a6fc42d12f01a1f3a4.zip
fluxbox_paul-7e04a570e3c1aa6c462041a6fc42d12f01a1f3a4.tar.bz2
using winclient instance name
Diffstat (limited to 'src')
-rw-r--r--src/Workspace.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc
index 89efbf5..4b75803 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.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: Workspace.cc,v 1.72 2003/06/13 20:50:49 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.73 2003/06/15 19:34:34 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -331,7 +331,7 @@ class FindInGroup {
331public: 331public:
332 FindInGroup(const FluxboxWindow &w):m_w(w) { } 332 FindInGroup(const FluxboxWindow &w):m_w(w) { }
333 bool operator ()(const string &name) { 333 bool operator ()(const string &name) {
334 return (name == m_w.instanceName()); 334 return (name == m_w.winClient().getWMClassName());
335 } 335 }
336private: 336private:
337 const FluxboxWindow &m_w; 337 const FluxboxWindow &m_w;
@@ -341,9 +341,10 @@ private:
341 341
342//Note: this function doesn't check if the window is groupable 342//Note: this function doesn't check if the window is groupable
343bool Workspace::checkGrouping(FluxboxWindow &win) { 343bool Workspace::checkGrouping(FluxboxWindow &win) {
344 if (win.numClients() == 0)
345 return false;
344#ifdef DEBUG 346#ifdef DEBUG
345 cerr<<__FILE__<<"("<<__LINE__<<"): Checking grouping. ("<<win.instanceName()<<"/"<< 347 cerr<<__FILE__<<"("<<__LINE__<<"): Checking grouping. ("<<win.title()<<")"<<endl;
346 win.className()<<")"<<endl;
347#endif // DEBUG 348#endif // DEBUG
348 if (!win.isGroupable()) { // make sure this window can hold a tab 349 if (!win.isGroupable()) { // make sure this window can hold a tab
349#ifdef DEBUG 350#ifdef DEBUG
@@ -352,6 +353,8 @@ bool Workspace::checkGrouping(FluxboxWindow &win) {
352 return false; 353 return false;
353 } 354 }
354 355
356 string instance_name = win.winClient().getWMClassName();
357
355 // go throu every group and search for matching win instancename 358 // go throu every group and search for matching win instancename
356 GroupList::iterator g(m_groups.begin()); 359 GroupList::iterator g(m_groups.begin());
357 GroupList::iterator g_end(m_groups.end()); 360 GroupList::iterator g_end(m_groups.end());
@@ -360,7 +363,7 @@ bool Workspace::checkGrouping(FluxboxWindow &win) {
360 Group::iterator name_end((*g).end()); 363 Group::iterator name_end((*g).end());
361 for (; name != name_end; ++name) { 364 for (; name != name_end; ++name) {
362 365
363 if ((*name) != win.instanceName()) 366 if ((*name) != instance_name)
364 continue; 367 continue;
365 368
366 // find a window with the specific name 369 // find a window with the specific name
@@ -368,7 +371,7 @@ bool Workspace::checkGrouping(FluxboxWindow &win) {
368 Windows::iterator wit_end(m_windowlist.end()); 371 Windows::iterator wit_end(m_windowlist.end());
369 for (; wit != wit_end; ++wit) { 372 for (; wit != wit_end; ++wit) {
370#ifdef DEBUG 373#ifdef DEBUG
371 cerr<<__FILE__<<" check group with : "<<(*wit)->instanceName()<<endl; 374 cerr<<__FILE__<<" check group with : "<<(*wit)->winClient().getWMClassName()<<endl;
372#endif // DEBUG 375#endif // DEBUG
373 if (find_if((*g).begin(), 376 if (find_if((*g).begin(),
374 (*g).end(), 377 (*g).end(),
@@ -381,7 +384,9 @@ bool Workspace::checkGrouping(FluxboxWindow &win) {
381#endif // DEBUG 384#endif // DEBUG
382 (*wit)->attachClient(win.winClient()); 385 (*wit)->attachClient(win.winClient());
383 return true; // grouping done 386 return true; // grouping done
387
384 } 388 }
389
385 } 390 }
386 391
387 } 392 }