From 6c4dcc679bd38096da08ef96b544a552d6c8776a Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 9 Aug 2006 04:54:58 +0000 Subject: it never existed (what never existed?) --- ChangeLog | 3 --- src/Ewmh.cc | 4 ++-- src/FbTk/FbPixmap.cc | 8 ++++---- src/Gnome.cc | 9 ++++----- src/Screen.cc | 7 +++---- src/WinClient.cc | 24 ++++++++++-------------- src/Window.cc | 15 ++++++--------- 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: *06/08/09: * Remove some old code that messed up placing submenus (Mark) FbTk/Menu.cc/hh -*06/08/08: - * Fix some warnings in gcc 4.1 (Mark) - FbTk/FbPixmap.cc Screen.cc Window.cc WinClient.cc Ewmh.cc Gnome.cc *06/08/07: * Documented background style option (Mark) 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) { Atom ret_type = 0; int fmt = 0; unsigned long nitems = 0, bytes_after = 0; - unsigned char *data = 0; + long *data = 0; if (winclient.property(m_net_wm_strut, 0, 4, False, XA_CARDINAL, &ret_type, &fmt, &nitems, &bytes_after, - &data) && data) { + (unsigned char **) &data) && data) { int head = winclient.screen().getHead(winclient); 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) { Atom real_type; int real_format; unsigned long items_read, items_left; - unsigned char *data; + unsigned long *data; if (XGetWindowProperty(display(), RootWindow(display(), screen_num), @@ -368,7 +368,7 @@ void FbPixmap::rootwinPropertyNotify(int screen_num, Atom atom) { False, XA_PIXMAP, &real_type, &real_format, &items_read, &items_left, - &data) == Success) { + (unsigned char **) &data) == Success) { if (real_format == 32 && items_read == 1) { root_pm = (Pixmap) (*data); } @@ -410,7 +410,7 @@ Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) { Atom real_type; int real_format; unsigned long items_read, items_left; - unsigned char *data; + unsigned long *data; unsigned int prop = 0; @@ -435,7 +435,7 @@ Pixmap FbPixmap::getRootPixmap(int screen_num, bool force_update) { False, XA_PIXMAP, &real_type, &real_format, &items_read, &items_left, - &data) == Success) { + (unsigned char **) &data) == Success) { if (real_format == 32 && items_read == 1) { if (print_error && strcmp(root_prop_ids[prop], "_XSETROOT_ID") == 0) { cerr<display(); // Check if KDE v2.x dock applet if (XGetWindowProperty(disp, client, @@ -1290,7 +1289,7 @@ bool BScreen::isKdeDockapp(Window client) const { "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False), 0l, 1l, False, XA_WINDOW, &ajunk, &ijunk, &uljunk, - &uljunk, &data) == Success) { + &uljunk, (unsigned char **) &data) == Success) { if (data) iskdedockapp = true; @@ -1305,7 +1304,7 @@ bool BScreen::isKdeDockapp(Window client) const { if (XGetWindowProperty(disp, client, kwm1, 0l, 1l, False, kwm1, &ajunk, &ijunk, &uljunk, - &uljunk, &data) == Success && data) { + &uljunk, (unsigned char **) &data) == Success && data) { iskdedockapp = (data && data[0] != 0); XFree((void *) data); 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() { int format; Atom atom_return; unsigned long num, len; - unsigned char *data; FbAtoms *atoms = FbAtoms::instance(); if (m_blackbox_hint) { @@ -423,21 +422,19 @@ void WinClient::updateBlackboxHints() { PropBlackboxHintsElements, False, atoms->getFluxboxHintsAtom(), &atom_return, &format, &num, &len, - &data) && - data) { + (unsigned char **) &m_blackbox_hint) && + m_blackbox_hint) { if (num != (unsigned)PropBlackboxHintsElements) { - XFree(data); + XFree(m_blackbox_hint); m_blackbox_hint = 0; - } else - m_blackbox_hint = (FluxboxWindow::BlackboxHints *) data; + } } } void WinClient::updateMWMHints() { int format; Atom atom_return; - unsigned char *data; unsigned long num = 0, len = 0; if (m_mwm_hint) { @@ -450,14 +447,13 @@ void WinClient::updateMWMHints() { PropMwmHintsElements, false, motif_wm_hints, &atom_return, &format, &num, &len, - &data) && - data)) { + (unsigned char **) &m_mwm_hint) && + m_mwm_hint)) { if (num != static_cast(PropMwmHintsElements)) { XFree(m_mwm_hint); m_mwm_hint = 0; return; } - m_mwm_hint = (MwmHints *) data; } } @@ -606,12 +602,12 @@ Window WinClient::getGroupLeftWindow() const { unsigned long num = 0, len = 0; Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False); - unsigned char *data = 0; + Window *data = 0; if (property(group_left_hint, 0, 1, false, XA_WINDOW, &atom_return, &format, &num, &len, - &data) && + (unsigned char **) &data) && data) { if (num != 1) { XFree(data); @@ -642,12 +638,12 @@ bool WinClient::hasGroupLeftWindow() const { unsigned long num = 0, len = 0; Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False); - unsigned char *data = 0; + Window *data = 0; if (property(group_left_hint, 0, 1, false, XA_WINDOW, &atom_return, &format, &num, &len, - &data) && + (unsigned char **) &data) && data) { XFree(data); 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() { Atom atom_return; bool ret = false; int foo; - unsigned char *state; - unsigned long ulfoo, nitems; + unsigned long *state, ulfoo, nitems; if (!m_client->property(FbAtoms::instance()->getWMStateAtom(), 0l, 2l, false, FbAtoms::instance()->getWMStateAtom(), &atom_return, &foo, &nitems, &ulfoo, - &state) || !state) + (unsigned char **) &state) || !state) return false; if (nitems >= 1) { @@ -2240,20 +2239,18 @@ void FluxboxWindow::restoreAttributes() { Atom atom_return; int foo; unsigned long ulfoo, nitems; - unsigned char *data; FbAtoms *fbatoms = FbAtoms::instance(); BlackboxAttributes *net; if (m_client->property(fbatoms->getFluxboxAttributesAtom(), 0l, PropBlackboxAttributesElements, false, fbatoms->getFluxboxAttributesAtom(), &atom_return, &foo, - &nitems, &ulfoo, &data) && - data) { + &nitems, &ulfoo, (unsigned char **) &net) && + net) { if (nitems != (unsigned)PropBlackboxAttributesElements) { - XFree(data); + XFree(net); return; } - net = (BlackboxAttributes *) data; m_blackbox_attrib.flags = net->flags; m_blackbox_attrib.attrib = net->attrib; m_blackbox_attrib.workspace = net->workspace; @@ -2263,7 +2260,7 @@ void FluxboxWindow::restoreAttributes() { m_blackbox_attrib.premax_w = net->premax_w; m_blackbox_attrib.premax_h = net->premax_h; - XFree(data); + XFree(static_cast(net)); } else return; -- cgit v0.11.2