summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/Ewmh.cc4
-rw-r--r--src/FbTk/FbPixmap.cc8
-rw-r--r--src/Gnome.cc9
-rw-r--r--src/Screen.cc7
-rw-r--r--src/WinClient.cc24
-rw-r--r--src/Window.cc15
7 files changed, 29 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 01b7ede..92bf591 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,9 +3,6 @@ Changes for 1.0rc3:
3*06/08/09: 3*06/08/09:
4 * Remove some old code that messed up placing submenus (Mark) 4 * Remove some old code that messed up placing submenus (Mark)
5 FbTk/Menu.cc/hh 5 FbTk/Menu.cc/hh
6*06/08/08:
7 * Fix some warnings in gcc 4.1 (Mark)
8 FbTk/FbPixmap.cc Screen.cc Window.cc WinClient.cc Ewmh.cc Gnome.cc
9*06/08/07: 6*06/08/07:
10 * Documented background style option (Mark) 7 * Documented background style option (Mark)
11 doc/asciidoc/fluxstyle.txt 8 doc/asciidoc/fluxstyle.txt
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index c697b6d..97c66b8 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -1138,10 +1138,10 @@ void Ewmh::updateStrut(WinClient &winclient) {
1138 Atom ret_type = 0; 1138 Atom ret_type = 0;
1139 int fmt = 0; 1139 int fmt = 0;
1140 unsigned long nitems = 0, bytes_after = 0; 1140 unsigned long nitems = 0, bytes_after = 0;
1141 unsigned char *data = 0; 1141 long *data = 0;
1142 if (winclient.property(m_net_wm_strut, 0, 4, False, XA_CARDINAL, 1142 if (winclient.property(m_net_wm_strut, 0, 4, False, XA_CARDINAL,
1143 &ret_type, &fmt, &nitems, &bytes_after, 1143 &ret_type, &fmt, &nitems, &bytes_after,
1144 &data) && data) { 1144 (unsigned char **) &data) && data) {
1145 1145
1146 int head = winclient.screen().getHead(winclient); 1146 int head = winclient.screen().getHead(winclient);
1147 winclient.setStrut(winclient.screen().requestStrut(head, 1147 winclient.setStrut(winclient.screen().requestStrut(head,
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index ea1d1c9..3aebd62 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -359,7 +359,7 @@ void FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) {
359 Atom real_type; 359 Atom real_type;
360 int real_format; 360 int real_format;
361 unsigned long items_read, items_left; 361 unsigned long items_read, items_left;
362 unsigned char *data; 362 unsigned long *data;
363 363
364 if (XGetWindowProperty(display(), 364 if (XGetWindowProperty(display(),
365 RootWindow(display(), screen_num), 365 RootWindow(display(), screen_num),
@@ -368,7 +368,7 @@ void FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) {
368 False, XA_PIXMAP, 368 False, XA_PIXMAP,
369 &real_type, &real_format, 369 &real_type, &real_format,
370 &items_read, &items_left, 370 &items_read, &items_left,
371 &data) == Success) { 371 (unsigned char **) &data) == Success) {
372 if (real_format == 32 && items_read == 1) { 372 if (real_format == 32 && items_read == 1) {
373 root_pm = (Pixmap) (*data); 373 root_pm = (Pixmap) (*data);
374 } 374 }
@@ -410,7 +410,7 @@ Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) {
410 Atom real_type; 410 Atom real_type;
411 int real_format; 411 int real_format;
412 unsigned long items_read, items_left; 412 unsigned long items_read, items_left;
413 unsigned char *data; 413 unsigned long *data;
414 414
415 unsigned int prop = 0; 415 unsigned int prop = 0;
416 416
@@ -435,7 +435,7 @@ Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) {
435 False, XA_PIXMAP, 435 False, XA_PIXMAP,
436 &real_type, &real_format, 436 &real_type, &real_format,
437 &items_read, &items_left, 437 &items_read, &items_left,
438 &data) == Success) { 438 (unsigned char **) &data) == Success) {
439 if (real_format == 32 && items_read == 1) { 439 if (real_format == 32 && items_read == 1) {
440 if (print_error && strcmp(root_prop_ids[prop], "_XSETROOT_ID") == 0) { 440 if (print_error && strcmp(root_prop_ids[prop], "_XSETROOT_ID") == 0) {
441 cerr<<error_message; 441 cerr<<error_message;
diff --git a/src/Gnome.cc b/src/Gnome.cc
index 684b7f6..81803dd 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -93,12 +93,11 @@ void Gnome::setupFrame(FluxboxWindow &win) {
93 Atom ret_type; 93 Atom ret_type;
94 int fmt; 94 int fmt;
95 unsigned long nitems, bytes_after; 95 unsigned long nitems, bytes_after;
96 long flags; 96 long flags, *data = 0;
97 unsigned char *data = 0;
98 97
99 if (win.winClient().property(m_gnome_wm_win_state, 0, 1, False, XA_CARDINAL, 98 if (win.winClient().property(m_gnome_wm_win_state, 0, 1, False, XA_CARDINAL,
100 &ret_type, &fmt, &nitems, &bytes_after, 99 &ret_type, &fmt, &nitems, &bytes_after,
101 &data) && data) { 100 (unsigned char **) &data) && data) {
102 flags = *data; 101 flags = *data;
103 setState(&win, flags); 102 setState(&win, flags);
104 XFree (data); 103 XFree (data);
@@ -109,7 +108,7 @@ void Gnome::setupFrame(FluxboxWindow &win) {
109 // load gnome layer atom 108 // load gnome layer atom
110 if (win.winClient().property(m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL, 109 if (win.winClient().property(m_gnome_wm_win_layer, 0, 1, False, XA_CARDINAL,
111 &ret_type, &fmt, &nitems, &bytes_after, 110 &ret_type, &fmt, &nitems, &bytes_after,
112 &data) && data) { 111 (unsigned char **) &data) && data) {
113 flags = *data; 112 flags = *data;
114 setLayer(&win, flags); 113 setLayer(&win, flags);
115 XFree (data); 114 XFree (data);
@@ -120,7 +119,7 @@ void Gnome::setupFrame(FluxboxWindow &win) {
120 // load gnome workspace atom 119 // load gnome workspace atom
121 if (win.winClient().property(m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, 120 if (win.winClient().property(m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL,
122 &ret_type, &fmt, &nitems, &bytes_after, 121 &ret_type, &fmt, &nitems, &bytes_after,
123 &data) && data) { 122 (unsigned char **) &data) && data) {
124 unsigned int workspace_num = *data; 123 unsigned int workspace_num = *data;
125 if (win.workspaceNumber() != workspace_num) 124 if (win.workspaceNumber() != workspace_num)
126 win.setWorkspace(workspace_num); 125 win.setWorkspace(workspace_num);
diff --git a/src/Screen.cc b/src/Screen.cc
index 65359e4..d2117ff 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1281,8 +1281,7 @@ bool BScreen::isKdeDockapp(Window client) const {
1281 bool iskdedockapp = false; 1281 bool iskdedockapp = false;
1282 Atom ajunk; 1282 Atom ajunk;
1283 int ijunk; 1283 int ijunk;
1284 unsigned char *data = 0; 1284 unsigned long *data = 0, uljunk;
1285 unsigned long uljunk;
1286 Display *disp = FbTk::App::instance()->display(); 1285 Display *disp = FbTk::App::instance()->display();
1287 // Check if KDE v2.x dock applet 1286 // Check if KDE v2.x dock applet
1288 if (XGetWindowProperty(disp, client, 1287 if (XGetWindowProperty(disp, client,
@@ -1290,7 +1289,7 @@ bool BScreen::isKdeDockapp(Window client) const {
1290 "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False), 1289 "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False),
1291 0l, 1l, False, 1290 0l, 1l, False,
1292 XA_WINDOW, &ajunk, &ijunk, &uljunk, 1291 XA_WINDOW, &ajunk, &ijunk, &uljunk,
1293 &uljunk, &data) == Success) { 1292 &uljunk, (unsigned char **) &data) == Success) {
1294 1293
1295 if (data) 1294 if (data)
1296 iskdedockapp = true; 1295 iskdedockapp = true;
@@ -1305,7 +1304,7 @@ bool BScreen::isKdeDockapp(Window client) const {
1305 if (XGetWindowProperty(disp, client, 1304 if (XGetWindowProperty(disp, client,
1306 kwm1, 0l, 1l, False, 1305 kwm1, 0l, 1l, False,
1307 kwm1, &ajunk, &ijunk, &uljunk, 1306 kwm1, &ajunk, &ijunk, &uljunk,
1308 &uljunk, &data) == Success && data) { 1307 &uljunk, (unsigned char **) &data) == Success && data) {
1309 iskdedockapp = (data && data[0] != 0); 1308 iskdedockapp = (data && data[0] != 0);
1310 XFree((void *) data); 1309 XFree((void *) data);
1311 data = 0; 1310 data = 0;
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 0eee037..b8149b2 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -411,7 +411,6 @@ void WinClient::updateBlackboxHints() {
411 int format; 411 int format;
412 Atom atom_return; 412 Atom atom_return;
413 unsigned long num, len; 413 unsigned long num, len;
414 unsigned char *data;
415 FbAtoms *atoms = FbAtoms::instance(); 414 FbAtoms *atoms = FbAtoms::instance();
416 415
417 if (m_blackbox_hint) { 416 if (m_blackbox_hint) {
@@ -423,21 +422,19 @@ void WinClient::updateBlackboxHints() {
423 PropBlackboxHintsElements, False, 422 PropBlackboxHintsElements, False,
424 atoms->getFluxboxHintsAtom(), &atom_return, 423 atoms->getFluxboxHintsAtom(), &atom_return,
425 &format, &num, &len, 424 &format, &num, &len,
426 &data) && 425 (unsigned char **) &m_blackbox_hint) &&
427 data) { 426 m_blackbox_hint) {
428 427
429 if (num != (unsigned)PropBlackboxHintsElements) { 428 if (num != (unsigned)PropBlackboxHintsElements) {
430 XFree(data); 429 XFree(m_blackbox_hint);
431 m_blackbox_hint = 0; 430 m_blackbox_hint = 0;
432 } else 431 }
433 m_blackbox_hint = (FluxboxWindow::BlackboxHints *) data;
434 } 432 }
435} 433}
436 434
437void WinClient::updateMWMHints() { 435void WinClient::updateMWMHints() {
438 int format; 436 int format;
439 Atom atom_return; 437 Atom atom_return;
440 unsigned char *data;
441 unsigned long num = 0, len = 0; 438 unsigned long num = 0, len = 0;
442 439
443 if (m_mwm_hint) { 440 if (m_mwm_hint) {
@@ -450,14 +447,13 @@ void WinClient::updateMWMHints() {
450 PropMwmHintsElements, false, 447 PropMwmHintsElements, false,
451 motif_wm_hints, &atom_return, 448 motif_wm_hints, &atom_return,
452 &format, &num, &len, 449 &format, &num, &len,
453 &data) && 450 (unsigned char **) &m_mwm_hint) &&
454 data)) { 451 m_mwm_hint)) {
455 if (num != static_cast<unsigned int>(PropMwmHintsElements)) { 452 if (num != static_cast<unsigned int>(PropMwmHintsElements)) {
456 XFree(m_mwm_hint); 453 XFree(m_mwm_hint);
457 m_mwm_hint = 0; 454 m_mwm_hint = 0;
458 return; 455 return;
459 } 456 }
460 m_mwm_hint = (MwmHints *) data;
461 } 457 }
462} 458}
463 459
@@ -606,12 +602,12 @@ Window WinClient::getGroupLeftWindow() const {
606 unsigned long num = 0, len = 0; 602 unsigned long num = 0, len = 0;
607 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False); 603 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False);
608 604
609 unsigned char *data = 0; 605 Window *data = 0;
610 if (property(group_left_hint, 0, 606 if (property(group_left_hint, 0,
611 1, false, 607 1, false,
612 XA_WINDOW, &atom_return, 608 XA_WINDOW, &atom_return,
613 &format, &num, &len, 609 &format, &num, &len,
614 &data) && 610 (unsigned char **) &data) &&
615 data) { 611 data) {
616 if (num != 1) { 612 if (num != 1) {
617 XFree(data); 613 XFree(data);
@@ -642,12 +638,12 @@ bool WinClient::hasGroupLeftWindow() const {
642 unsigned long num = 0, len = 0; 638 unsigned long num = 0, len = 0;
643 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False); 639 Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False);
644 640
645 unsigned char *data = 0; 641 Window *data = 0;
646 if (property(group_left_hint, 0, 642 if (property(group_left_hint, 0,
647 1, false, 643 1, false,
648 XA_WINDOW, &atom_return, 644 XA_WINDOW, &atom_return,
649 &format, &num, &len, 645 &format, &num, &len,
650 &data) && 646 (unsigned char **) &data) &&
651 data) { 647 data) {
652 XFree(data); 648 XFree(data);
653 if (num != 1) 649 if (num != 1)
diff --git a/src/Window.cc b/src/Window.cc
index 43d0517..5aebad4 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2207,12 +2207,11 @@ bool FluxboxWindow::getState() {
2207 Atom atom_return; 2207 Atom atom_return;
2208 bool ret = false; 2208 bool ret = false;
2209 int foo; 2209 int foo;
2210 unsigned char *state; 2210 unsigned long *state, ulfoo, nitems;
2211 unsigned long ulfoo, nitems;
2212 if (!m_client->property(FbAtoms::instance()->getWMStateAtom(), 2211 if (!m_client->property(FbAtoms::instance()->getWMStateAtom(),
2213 0l, 2l, false, FbAtoms::instance()->getWMStateAtom(), 2212 0l, 2l, false, FbAtoms::instance()->getWMStateAtom(),
2214 &atom_return, &foo, &nitems, &ulfoo, 2213 &atom_return, &foo, &nitems, &ulfoo,
2215 &state) || !state) 2214 (unsigned char **) &state) || !state)
2216 return false; 2215 return false;
2217 2216
2218 if (nitems >= 1) { 2217 if (nitems >= 1) {
@@ -2240,20 +2239,18 @@ void FluxboxWindow::restoreAttributes() {
2240 Atom atom_return; 2239 Atom atom_return;
2241 int foo; 2240 int foo;
2242 unsigned long ulfoo, nitems; 2241 unsigned long ulfoo, nitems;
2243 unsigned char *data;
2244 FbAtoms *fbatoms = FbAtoms::instance(); 2242 FbAtoms *fbatoms = FbAtoms::instance();
2245 2243
2246 BlackboxAttributes *net; 2244 BlackboxAttributes *net;
2247 if (m_client->property(fbatoms->getFluxboxAttributesAtom(), 0l, 2245 if (m_client->property(fbatoms->getFluxboxAttributesAtom(), 0l,
2248 PropBlackboxAttributesElements, false, 2246 PropBlackboxAttributesElements, false,
2249 fbatoms->getFluxboxAttributesAtom(), &atom_return, &foo, 2247 fbatoms->getFluxboxAttributesAtom(), &atom_return, &foo,
2250 &nitems, &ulfoo, &data) && 2248 &nitems, &ulfoo, (unsigned char **) &net) &&
2251 data) { 2249 net) {
2252 if (nitems != (unsigned)PropBlackboxAttributesElements) { 2250 if (nitems != (unsigned)PropBlackboxAttributesElements) {
2253 XFree(data); 2251 XFree(net);
2254 return; 2252 return;
2255 } 2253 }
2256 net = (BlackboxAttributes *) data;
2257 m_blackbox_attrib.flags = net->flags; 2254 m_blackbox_attrib.flags = net->flags;
2258 m_blackbox_attrib.attrib = net->attrib; 2255 m_blackbox_attrib.attrib = net->attrib;
2259 m_blackbox_attrib.workspace = net->workspace; 2256 m_blackbox_attrib.workspace = net->workspace;
@@ -2263,7 +2260,7 @@ void FluxboxWindow::restoreAttributes() {
2263 m_blackbox_attrib.premax_w = net->premax_w; 2260 m_blackbox_attrib.premax_w = net->premax_w;
2264 m_blackbox_attrib.premax_h = net->premax_h; 2261 m_blackbox_attrib.premax_h = net->premax_h;
2265 2262
2266 XFree(data); 2263 XFree(static_cast<void *>(net));
2267 } else 2264 } else
2268 return; 2265 return;
2269 2266