removed throw in FluxboxWindow

This commit is contained in:
fluxgen 2002-02-11 11:07:33 +00:00
parent 60fef19adb
commit 790cf3d5b4

View file

@ -22,10 +22,9 @@
// 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: Window.cc,v 1.25 2002/02/07 14:41:52 fluxgen Exp $ // $Id: Window.cc,v 1.26 2002/02/11 11:07:33 fluxgen Exp $
// stupid macros needed to access some functions in version 2 of the GNU C //use GNU extensions
// library
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
@ -162,7 +161,7 @@ tab(0)
XWindowAttributes wattrib; XWindowAttributes wattrib;
if ((! XGetWindowAttributes(display, client.window, &wattrib)) || if ((! XGetWindowAttributes(display, client.window, &wattrib)) ||
(! wattrib.screen) || wattrib.override_redirect) { (! wattrib.screen) || wattrib.override_redirect) {
throw FluxboxWindow::XGETWINDOWATTRIB; return;
} }
if (s) if (s)
@ -171,7 +170,7 @@ tab(0)
screen = fluxbox->searchScreen(RootWindowOfScreen(wattrib.screen)); screen = fluxbox->searchScreen(RootWindowOfScreen(wattrib.screen));
if (!screen) if (!screen)
throw FluxboxWindow::CANTFINDSCREEN; return;
image_ctrl = screen->getImageControl(); image_ctrl = screen->getImageControl();
@ -200,11 +199,12 @@ tab(0)
if (client.initial_state == WithdrawnState) { if (client.initial_state == WithdrawnState) {
screen->getSlit()->addClient(client.window); screen->getSlit()->addClient(client.window);
throw NOERROR; return;
} }
#endif // SLIT #endif // SLIT
managed = true; managed = true; //mark for usage
fluxbox->saveWindowSearch(client.window, this); fluxbox->saveWindowSearch(client.window, this);
// determine if this is a transient window // determine if this is a transient window
@ -308,8 +308,8 @@ tab(0)
frame.plate = createChildWindow(frame.window); //Create plate window frame.plate = createChildWindow(frame.window); //Create plate window
fluxbox->saveWindowSearch(frame.plate, this); //save plate window fluxbox->saveWindowSearch(frame.plate, this); //save plate window
if (decorations.titlebar) { //have titlebar decorations?
frame.title = createChildWindow(frame.window); //create titlebar win frame.title = createChildWindow(frame.window); //create titlebar win
if (decorations.titlebar) { //have titlebar decorations?
fluxbox->saveWindowSearch(frame.title, this); //save titlebar win fluxbox->saveWindowSearch(frame.title, this); //save titlebar win
frame.label = createChildWindow(frame.title); //create label win in titlebar frame.label = createChildWindow(frame.title); //create label win in titlebar
fluxbox->saveWindowSearch(frame.label, this); //save label win fluxbox->saveWindowSearch(frame.label, this); //save label win
@ -328,6 +328,7 @@ tab(0)
fluxbox->saveWindowSearch(frame.right_grip, this); //save right handle fluxbox->saveWindowSearch(frame.right_grip, this); //save right handle
} }
associateClientWindow(); associateClientWindow();
@ -359,6 +360,7 @@ tab(0)
//use tab? delayed this so that tabs wont "flicker" when creating windows //use tab? delayed this so that tabs wont "flicker" when creating windows
if (decorations.tab && fluxbox->useTabs()) if (decorations.tab && fluxbox->useTabs())
tab = new Tab(this, 0, 0); tab = new Tab(this, 0, 0);
decorate();
XRaiseWindow(display, frame.plate); XRaiseWindow(display, frame.plate);
XMapSubwindows(display, frame.plate); XMapSubwindows(display, frame.plate);
@ -370,8 +372,6 @@ tab(0)
if (decorations.menu) if (decorations.menu)
windowmenu = new Windowmenu(this); windowmenu = new Windowmenu(this);
decorate();
if (workspace_number < 0 || workspace_number >= screen->getCount()) if (workspace_number < 0 || workspace_number >= screen->getCount())
screen->getCurrentWorkspace()->addWindow(this, place_window); screen->getCurrentWorkspace()->addWindow(this, place_window);
else else
@ -2331,7 +2331,8 @@ void FluxboxWindow::setGravityOffsets(void) {
void FluxboxWindow::restoreAttributes(void) { void FluxboxWindow::restoreAttributes(void) {
if (! getState()) current_state = NormalState; if (!getState())
current_state = NormalState;
Atom atom_return; Atom atom_return;
int foo; int foo;