diff options
author | fluxgen <fluxgen> | 2003-04-25 11:56:13 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-25 11:56:13 (GMT) |
commit | d2a50e03206f58557cfed0ab4bcd12a2c833eb0a (patch) | |
tree | 40c63c82206433c14bfea0e8b1d6a80eda7155ec /src | |
parent | e3921394c98ce6e894d7ac0c6d5af2ba0e6fb062 (diff) | |
download | fluxbox_lack-d2a50e03206f58557cfed0ab4bcd12a2c833eb0a.zip fluxbox_lack-d2a50e03206f58557cfed0ab4bcd12a2c833eb0a.tar.bz2 |
minor fix for root pixmap
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 40 | ||||
-rw-r--r-- | src/Screen.hh | 6 |
2 files changed, 26 insertions, 20 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 57ae7f0..ac60d79 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.132 2003/04/25 11:05:11 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.133 2003/04/25 11:56:13 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -544,21 +544,6 @@ BScreen::BScreen(ResourceManager &rm, | |||
544 | (unsigned char *) &bpid, 1); | 544 | (unsigned char *) &bpid, 1); |
545 | #endif // HAVE_GETPID | 545 | #endif // HAVE_GETPID |
546 | 546 | ||
547 | Atom real_type; | ||
548 | int real_format; | ||
549 | unsigned long items_read, items_left; | ||
550 | unsigned int *data; | ||
551 | if (XGetWindowProperty(disp, getRootWindow(), | ||
552 | XInternAtom(disp, "_XROOTPMAP_ID", false), | ||
553 | 0L, 1L, | ||
554 | false, XA_PIXMAP, &real_type, | ||
555 | &real_format, &items_read, &items_left, | ||
556 | (unsigned char **) &data) == Success && | ||
557 | items_read) { | ||
558 | m_root_pm = (Pixmap) (*data); | ||
559 | XFree(data); | ||
560 | } else | ||
561 | m_root_pm = 0; | ||
562 | 547 | ||
563 | cycling_window = focused_list.end(); | 548 | cycling_window = focused_list.end(); |
564 | 549 | ||
@@ -784,6 +769,29 @@ FbTk::Menu &BScreen::getToolbarModemenu() { | |||
784 | unsigned int BScreen::getCurrentWorkspaceID() const { | 769 | unsigned int BScreen::getCurrentWorkspaceID() const { |
785 | return current_workspace->workspaceID(); | 770 | return current_workspace->workspaceID(); |
786 | } | 771 | } |
772 | |||
773 | Pixmap BScreen::rootPixmap() const { | ||
774 | |||
775 | Pixmap root_pm = 0; | ||
776 | Display *disp = FbTk::App::instance()->display(); | ||
777 | Atom real_type; | ||
778 | int real_format; | ||
779 | unsigned long items_read, items_left; | ||
780 | unsigned int *data; | ||
781 | if (XGetWindowProperty(disp, getRootWindow(), | ||
782 | XInternAtom(disp, "_XROOTPMAP_ID", false), | ||
783 | 0L, 1L, | ||
784 | false, XA_PIXMAP, &real_type, | ||
785 | &real_format, &items_read, &items_left, | ||
786 | (unsigned char **) &data) == Success && | ||
787 | items_read) { | ||
788 | root_pm = (Pixmap) (*data); | ||
789 | XFree(data); | ||
790 | } | ||
791 | |||
792 | return root_pm; | ||
793 | |||
794 | } | ||
787 | 795 | ||
788 | /// TODO | 796 | /// TODO |
789 | unsigned int BScreen::getMaxLeft() const { | 797 | unsigned int BScreen::getMaxLeft() const { |
diff --git a/src/Screen.hh b/src/Screen.hh index 1ba480d..42be8da 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.hh,v 1.85 2003/04/25 11:40:22 fluxgen Exp $ | 25 | // $Id: Screen.hh,v 1.86 2003/04/25 11:56:12 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -129,7 +129,7 @@ public: | |||
129 | FbTk::Menu *getWorkspacemenu() { return workspacemenu.get(); } | 129 | FbTk::Menu *getWorkspacemenu() { return workspacemenu.get(); } |
130 | 130 | ||
131 | unsigned int getCurrentWorkspaceID() const; | 131 | unsigned int getCurrentWorkspaceID() const; |
132 | Pixmap rootPixmap() const { return m_root_pm; } | 132 | Pixmap rootPixmap() const; |
133 | /* | 133 | /* |
134 | maximum screen surface | 134 | maximum screen surface |
135 | */ | 135 | */ |
@@ -412,8 +412,6 @@ private: | |||
412 | 412 | ||
413 | std::auto_ptr<RootTheme> m_root_theme; | 413 | std::auto_ptr<RootTheme> m_root_theme; |
414 | ToolbarHandler *m_toolbarhandler; | 414 | ToolbarHandler *m_toolbarhandler; |
415 | Pixmap m_root_pm; | ||
416 | |||
417 | }; | 415 | }; |
418 | 416 | ||
419 | 417 | ||