aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-04-27 14:36:05 (GMT)
committerrathnor <rathnor>2003-04-27 14:36:05 (GMT)
commit63ac5deee691f7b528399c0f03e100e983a8cb55 (patch)
tree84a36fabdc129ecb5a92f3b0ecd91978514646d8 /src/Window.cc
parentecf483e0c64d4123e16298464260af5ab6ed3c55 (diff)
downloadfluxbox_pavel-63ac5deee691f7b528399c0f03e100e983a8cb55.zip
fluxbox_pavel-63ac5deee691f7b528399c0f03e100e983a8cb55.tar.bz2
fix nextFocus problem with tabbed windows
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc48
1 files changed, 19 insertions, 29 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 5c40cc0..01f99f4 100644
--- a/src/Window.cc
+++ b/src/Window.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: Window.cc,v 1.152 2003/04/27 12:31:43 fluxgen Exp $ 25// $Id: Window.cc,v 1.153 2003/04/27 14:36:04 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -702,16 +702,15 @@ void FluxboxWindow::prevClient() {
702 setInputFocus(); 702 setInputFocus();
703} 703}
704 704
705void FluxboxWindow::setCurrentClient(WinClient &client) { 705bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
706 // make sure it's in our list 706 // make sure it's in our list
707 if (client.m_win != this) 707 if (client.m_win != this)
708 return; 708 return false;
709 709
710 m_client = &client; 710 m_client = &client;
711 m_client->raise(); 711 m_client->raise();
712 Fluxbox::instance()->setFocusedWindow(this);
713 m_frame.setLabelButtonFocus(*m_labelbuttons[m_client]); 712 m_frame.setLabelButtonFocus(*m_labelbuttons[m_client]);
714 setInputFocus(); 713 return setinput && setInputFocus();
715} 714}
716 715
717bool FluxboxWindow::isGroupable() const { 716bool FluxboxWindow::isGroupable() const {
@@ -2321,21 +2320,15 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2321 doSnapping(dx, dy); 2320 doSnapping(dx, dy);
2322 2321
2323 if (! screen.doOpaqueMove()) { 2322 if (! screen.doOpaqueMove()) {
2324 XDrawRectangle(display, screen.getRootWindow(), 2323 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(),
2325 screen.rootTheme().opGC(),
2326 last_move_x, last_move_y, 2324 last_move_x, last_move_y,
2327 m_frame.width() + 2325 m_frame.width() + 2*frame().window().borderWidth()-1,
2328 2*frame().window().borderWidth() - 1, 2326 m_frame.height() + 2*frame().window().borderWidth()-1);
2329 m_frame.height() +
2330 2*frame().window().borderWidth() - 1);
2331 2327
2332 XDrawRectangle(display, screen.getRootWindow(), 2328 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(),
2333 screen.rootTheme().opGC(),
2334 dx, dy, 2329 dx, dy,
2335 m_frame.width() + 2330 m_frame.width() + 2*frame().window().borderWidth()-1,
2336 2*frame().window().borderWidth()-1, 2331 m_frame.height() + 2*frame().window().borderWidth()-1);
2337 m_frame.height() +
2338 2*frame().window().borderWidth()-1);
2339 last_move_x = dx; 2332 last_move_x = dx;
2340 last_move_y = dy; 2333 last_move_y = dy;
2341 } else { 2334 } else {
@@ -2356,8 +2349,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2356 startResizing(me.window, me.x, me.y, left); 2349 startResizing(me.window, me.x, me.y, left);
2357 } else if (resizing) { 2350 } else if (resizing) {
2358 // draw over old rect 2351 // draw over old rect
2359 XDrawRectangle(display, screen.getRootWindow(), 2352 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(),
2360 screen.rootTheme().opGC(),
2361 last_resize_x, last_resize_y, 2353 last_resize_x, last_resize_y,
2362 last_resize_w - 1 + 2 * m_frame.window().borderWidth(), 2354 last_resize_w - 1 + 2 * m_frame.window().borderWidth(),
2363 last_resize_h - 1 + 2 * m_frame.window().borderWidth()); 2355 last_resize_h - 1 + 2 * m_frame.window().borderWidth());
@@ -2385,8 +2377,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2385 } 2377 }
2386 2378
2387 // draw resize rectangle 2379 // draw resize rectangle
2388 XDrawRectangle(display, screen.getRootWindow(), 2380 XDrawRectangle(display, screen.getRootWindow(), screen.rootTheme().opGC(),
2389 screen.rootTheme().opGC(),
2390 last_resize_x, last_resize_y, 2381 last_resize_x, last_resize_y,
2391 last_resize_w - 1 + 2 * m_frame.window().borderWidth(), 2382 last_resize_w - 1 + 2 * m_frame.window().borderWidth(),
2392 last_resize_h - 1 + 2 * m_frame.window().borderWidth()); 2383 last_resize_h - 1 + 2 * m_frame.window().borderWidth());
@@ -2477,6 +2468,7 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2477 ev.window == m_client->window()) { 2468 ev.window == m_client->window()) {
2478 if ((screen.isSloppyFocus() || screen.isSemiSloppyFocus()) 2469 if ((screen.isSloppyFocus() || screen.isSemiSloppyFocus())
2479 && !isFocused()) { 2470 && !isFocused()) {
2471
2480 2472
2481 // check that there aren't any subsequent leave notify events in the 2473 // check that there aren't any subsequent leave notify events in the
2482 // X event queue 2474 // X event queue
@@ -2488,6 +2480,7 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2488 2480
2489 if ((!sa.leave || sa.inferior) && setInputFocus()) 2481 if ((!sa.leave || sa.inferior) && setInputFocus())
2490 installColormap(True); 2482 installColormap(True);
2483
2491 2484
2492 } 2485 }
2493 } 2486 }
@@ -2653,18 +2646,15 @@ void FluxboxWindow::stopMoving() {
2653 2646
2654 2647
2655 if (! screen.doOpaqueMove()) { 2648 if (! screen.doOpaqueMove()) {
2656 XDrawRectangle(FbTk::App::instance()->display(), 2649 XDrawRectangle(FbTk::App::instance()->display(), screen.getRootWindow(), screen.rootTheme().opGC(),
2657 screen.getRootWindow(), screen.rootTheme().opGC(),
2658 last_move_x, last_move_y, 2650 last_move_x, last_move_y,
2659 frame().width() + 2*frame().window().borderWidth() - 1, 2651 frame().width() + 2*frame().window().borderWidth()-1,
2660 frame().height() + 2*frame().window().borderWidth() - 1); 2652 frame().height() + 2*frame().window().borderWidth()-1);
2661
2662 moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height()); 2653 moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height());
2663
2664 if (workspace_number != getScreen().getCurrentWorkspaceID()) { 2654 if (workspace_number != getScreen().getCurrentWorkspaceID()) {
2665 deiconify(true, false); 2655 screen.reassociateWindow(this, getScreen().getCurrentWorkspaceID(), true);
2656 m_frame.show();
2666 } 2657 }
2667
2668 fluxbox->ungrab(); 2658 fluxbox->ungrab();
2669 } else 2659 } else
2670 moveResize(m_frame.x(), m_frame.y(), m_frame.width(), m_frame.height()); 2660 moveResize(m_frame.x(), m_frame.y(), m_frame.width(), m_frame.height());