summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Window.cc b/src/Window.cc
index f3c3bc3..59341b7 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,10 +22,9 @@
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.25 2002/02/07 14:41:52 fluxgen Exp $ 25// $Id: Window.cc,v 1.26 2002/02/11 11:07:33 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27//use GNU extensions
28// library
29#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
30#define _GNU_SOURCE 29#define _GNU_SOURCE
31#endif // _GNU_SOURCE 30#endif // _GNU_SOURCE
@@ -162,7 +161,7 @@ tab(0)
162 XWindowAttributes wattrib; 161 XWindowAttributes wattrib;
163 if ((! XGetWindowAttributes(display, client.window, &wattrib)) || 162 if ((! XGetWindowAttributes(display, client.window, &wattrib)) ||
164 (! wattrib.screen) || wattrib.override_redirect) { 163 (! wattrib.screen) || wattrib.override_redirect) {
165 throw FluxboxWindow::XGETWINDOWATTRIB; 164 return;
166 } 165 }
167 166
168 if (s) 167 if (s)
@@ -171,7 +170,7 @@ tab(0)
171 screen = fluxbox->searchScreen(RootWindowOfScreen(wattrib.screen)); 170 screen = fluxbox->searchScreen(RootWindowOfScreen(wattrib.screen));
172 171
173 if (!screen) 172 if (!screen)
174 throw FluxboxWindow::CANTFINDSCREEN; 173 return;
175 174
176 175
177 image_ctrl = screen->getImageControl(); 176 image_ctrl = screen->getImageControl();
@@ -200,11 +199,12 @@ tab(0)
200 199
201 if (client.initial_state == WithdrawnState) { 200 if (client.initial_state == WithdrawnState) {
202 screen->getSlit()->addClient(client.window); 201 screen->getSlit()->addClient(client.window);
203 throw NOERROR; 202 return;
204 } 203 }
205 #endif // SLIT 204 #endif // SLIT
206 205
207 managed = true; 206 managed = true; //mark for usage
207
208 fluxbox->saveWindowSearch(client.window, this); 208 fluxbox->saveWindowSearch(client.window, this);
209 209
210 // determine if this is a transient window 210 // determine if this is a transient window
@@ -307,9 +307,9 @@ tab(0)
307 307
308 frame.plate = createChildWindow(frame.window); //Create plate window 308 frame.plate = createChildWindow(frame.window); //Create plate window
309 fluxbox->saveWindowSearch(frame.plate, this); //save plate window 309 fluxbox->saveWindowSearch(frame.plate, this); //save plate window
310 310
311 if (decorations.titlebar) { //have titlebar decorations? 311 frame.title = createChildWindow(frame.window); //create titlebar win
312 frame.title = createChildWindow(frame.window); //create titlebar win 312 if (decorations.titlebar) { //have titlebar decorations?
313 fluxbox->saveWindowSearch(frame.title, this); //save titlebar win 313 fluxbox->saveWindowSearch(frame.title, this); //save titlebar win
314 frame.label = createChildWindow(frame.title); //create label win in titlebar 314 frame.label = createChildWindow(frame.title); //create label win in titlebar
315 fluxbox->saveWindowSearch(frame.label, this); //save label win 315 fluxbox->saveWindowSearch(frame.label, this); //save label win
@@ -327,7 +327,8 @@ tab(0)
327 createChildWindow(frame.handle, fluxbox->getLowerRightAngleCursor()); 327 createChildWindow(frame.handle, fluxbox->getLowerRightAngleCursor());
328 fluxbox->saveWindowSearch(frame.right_grip, this); //save right handle 328 fluxbox->saveWindowSearch(frame.right_grip, this); //save right handle
329 } 329 }
330 330
331
331 associateClientWindow(); 332 associateClientWindow();
332 333
333 334
@@ -359,7 +360,8 @@ tab(0)
359 //use tab? delayed this so that tabs wont "flicker" when creating windows 360 //use tab? delayed this so that tabs wont "flicker" when creating windows
360 if (decorations.tab && fluxbox->useTabs()) 361 if (decorations.tab && fluxbox->useTabs())
361 tab = new Tab(this, 0, 0); 362 tab = new Tab(this, 0, 0);
362 363 decorate();
364
363 XRaiseWindow(display, frame.plate); 365 XRaiseWindow(display, frame.plate);
364 XMapSubwindows(display, frame.plate); 366 XMapSubwindows(display, frame.plate);
365 if (decorations.titlebar) 367 if (decorations.titlebar)
@@ -370,8 +372,6 @@ tab(0)
370 if (decorations.menu) 372 if (decorations.menu)
371 windowmenu = new Windowmenu(this); 373 windowmenu = new Windowmenu(this);
372 374
373 decorate();
374
375 if (workspace_number < 0 || workspace_number >= screen->getCount()) 375 if (workspace_number < 0 || workspace_number >= screen->getCount())
376 screen->getCurrentWorkspace()->addWindow(this, place_window); 376 screen->getCurrentWorkspace()->addWindow(this, place_window);
377 else 377 else
@@ -2331,7 +2331,8 @@ void FluxboxWindow::setGravityOffsets(void) {
2331 2331
2332 2332
2333void FluxboxWindow::restoreAttributes(void) { 2333void FluxboxWindow::restoreAttributes(void) {
2334 if (! getState()) current_state = NormalState; 2334 if (!getState())
2335 current_state = NormalState;
2335 2336
2336 Atom atom_return; 2337 Atom atom_return;
2337 int foo; 2338 int foo;