summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index ce0afb5..11be04c 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.cc,v 1.52 2004/10/16 22:20:05 akir Exp $ 22// $Id: Ewmh.cc,v 1.53 2004/10/21 10:57:38 akir Exp $
23 23
24#include "Ewmh.hh" 24#include "Ewmh.hh"
25 25
@@ -35,8 +35,17 @@
35#include <iostream> 35#include <iostream>
36#include <algorithm> 36#include <algorithm>
37#include <new> 37#include <new>
38
38using namespace std; 39using namespace std;
39 40
41// mipspro has no new(nothrow)
42#if defined sgi && ! defined GCC
43#define FB_new_nothrow new
44#else
45#define FB_new_nothrow new(std::nothrow)
46#endif
47
48
40Ewmh::Ewmh() { 49Ewmh::Ewmh() {
41 createAtoms(); 50 createAtoms();
42} 51}
@@ -264,7 +273,7 @@ void Ewmh::updateClientList(BScreen &screen) {
264 num += (*icon_it)->numClients(); 273 num += (*icon_it)->numClients();
265 } 274 }
266 275
267 Window *wl = new (nothrow) Window[num]; 276 Window *wl = FB_new_nothrow Window[num];
268 if (wl == 0) { 277 if (wl == 0) {
269 _FB_USES_NLS; 278 _FB_USES_NLS;
270 cerr<<_FBTEXT(Ewmh, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl; 279 cerr<<_FBTEXT(Ewmh, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl;
@@ -377,6 +386,7 @@ void Ewmh::updateWorkspaceNames(BScreen &screen) {
377 386
378 for (size_t i = 0; i < number_of_desks; i++) 387 for (size_t i = 0; i < number_of_desks; i++)
379 delete [] names[i]; 388 delete [] names[i];
389
380} 390}
381 391
382void Ewmh::updateCurrentWorkspace(BScreen &screen) { 392void Ewmh::updateCurrentWorkspace(BScreen &screen) {