minor fix for root pixmap

This commit is contained in:
fluxgen 2003-04-25 11:56:13 +00:00
parent e3921394c9
commit d2a50e0320
2 changed files with 26 additions and 20 deletions

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.cc,v 1.132 2003/04/25 11:05:11 fluxgen Exp $
// $Id: Screen.cc,v 1.133 2003/04/25 11:56:13 fluxgen Exp $
#include "Screen.hh"
@ -544,21 +544,6 @@ BScreen::BScreen(ResourceManager &rm,
(unsigned char *) &bpid, 1);
#endif // HAVE_GETPID
Atom real_type;
int real_format;
unsigned long items_read, items_left;
unsigned int *data;
if (XGetWindowProperty(disp, getRootWindow(),
XInternAtom(disp, "_XROOTPMAP_ID", false),
0L, 1L,
false, XA_PIXMAP, &real_type,
&real_format, &items_read, &items_left,
(unsigned char **) &data) == Success &&
items_read) {
m_root_pm = (Pixmap) (*data);
XFree(data);
} else
m_root_pm = 0;
cycling_window = focused_list.end();
@ -784,6 +769,29 @@ FbTk::Menu &BScreen::getToolbarModemenu() {
unsigned int BScreen::getCurrentWorkspaceID() const {
return current_workspace->workspaceID();
}
Pixmap BScreen::rootPixmap() const {
Pixmap root_pm = 0;
Display *disp = FbTk::App::instance()->display();
Atom real_type;
int real_format;
unsigned long items_read, items_left;
unsigned int *data;
if (XGetWindowProperty(disp, getRootWindow(),
XInternAtom(disp, "_XROOTPMAP_ID", false),
0L, 1L,
false, XA_PIXMAP, &real_type,
&real_format, &items_read, &items_left,
(unsigned char **) &data) == Success &&
items_read) {
root_pm = (Pixmap) (*data);
XFree(data);
}
return root_pm;
}
/// TODO
unsigned int BScreen::getMaxLeft() const {

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.hh,v 1.85 2003/04/25 11:40:22 fluxgen Exp $
// $Id: Screen.hh,v 1.86 2003/04/25 11:56:12 fluxgen Exp $
#ifndef SCREEN_HH
#define SCREEN_HH
@ -129,7 +129,7 @@ public:
FbTk::Menu *getWorkspacemenu() { return workspacemenu.get(); }
unsigned int getCurrentWorkspaceID() const;
Pixmap rootPixmap() const { return m_root_pm; }
Pixmap rootPixmap() const;
/*
maximum screen surface
*/
@ -412,8 +412,6 @@ private:
std::auto_ptr<RootTheme> m_root_theme;
ToolbarHandler *m_toolbarhandler;
Pixmap m_root_pm;
};