aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-12 04:23:31 (GMT)
committerfluxgen <fluxgen>2003-05-12 04:23:31 (GMT)
commit244c63f4b46469b4ce5879259dafef3d5062c6cd (patch)
treed1a5abf06ed92783c13c8d19f6d415aaa9004e9f /src
parenta084e737f84b8c0840efdbac13e1af6010f279d9 (diff)
downloadfluxbox_paul-244c63f4b46469b4ce5879259dafef3d5062c6cd.zip
fluxbox_paul-244c63f4b46469b4ce5879259dafef3d5062c6cd.tar.bz2
added RANDR support
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc26
-rw-r--r--src/fluxbox.hh3
2 files changed, 27 insertions, 2 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index b77bd73..48573a5 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.139 2003/05/11 23:44:09 rathnor Exp $ 25// $Id: fluxbox.cc,v 1.140 2003/05/12 04:23:31 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -42,6 +42,7 @@
42#include "Keys.hh" 42#include "Keys.hh"
43#include "FbAtoms.hh" 43#include "FbAtoms.hh"
44 44
45
45//Use GNU extensions 46//Use GNU extensions
46#ifndef _GNU_SOURCE 47#ifndef _GNU_SOURCE
47#define _GNU_SOURCE 48#define _GNU_SOURCE
@@ -71,9 +72,15 @@
71#include <X11/Xatom.h> 72#include <X11/Xatom.h>
72#include <X11/keysym.h> 73#include <X11/keysym.h>
73#include <X11/cursorfont.h> 74#include <X11/cursorfont.h>
75// X extensions
74#ifdef SHAPE 76#ifdef SHAPE
75#include <X11/extensions/shape.h> 77#include <X11/extensions/shape.h>
76#endif // SHAPE 78#endif // SHAPE
79#ifdef HAVE_RANDR
80#include <X11/extensions/Xrandr.h>
81#endif // HAVE_RANDR
82
83// system headers
77 84
78#include <cstdio> 85#include <cstdio>
79#include <cstdlib> 86#include <cstdlib>
@@ -410,6 +417,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
410 m_starting(true), 417 m_starting(true),
411 m_shutdown(false), 418 m_shutdown(false),
412 m_server_grabs(0), 419 m_server_grabs(0),
420 m_randr_event_type(0),
413 m_RC_PATH("fluxbox"), 421 m_RC_PATH("fluxbox"),
414 m_RC_INIT_FILE("init") { 422 m_RC_INIT_FILE("init") {
415 423
@@ -442,6 +450,12 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
442 450
443 s_singleton = this; 451 s_singleton = this;
444 452
453#ifdef HAVE_RANDR
454 // get randr event type
455 int error_base;
456 XRRQueryExtension(disp, &m_randr_event_type, &error_base);
457#endif // HAVE_RANDR
458
445 // setup atom handlers before we create any windows 459 // setup atom handlers before we create any windows
446#ifdef USE_GNOME 460#ifdef USE_GNOME
447 addAtomHandler(new Gnome()); // for gnome 1 atom support 461 addAtomHandler(new Gnome()); // for gnome 1 atom support
@@ -450,6 +464,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
450#ifdef USE_NEWWMSPEC 464#ifdef USE_NEWWMSPEC
451 addAtomHandler(new Ewmh()); // for Extended window manager atom support 465 addAtomHandler(new Ewmh()); // for Extended window manager atom support
452#endif // USE_NEWWMSPEC 466#endif // USE_NEWWMSPEC
467
453#ifdef REMEMBER 468#ifdef REMEMBER
454 addAtomHandler(new Remember()); // for remembering window attribs 469 addAtomHandler(new Remember()); // for remembering window attribs
455#endif // REMEMBER 470#endif // REMEMBER
@@ -853,6 +868,15 @@ void Fluxbox::handleEvent(XEvent * const e) {
853 handleClientMessage(e->xclient); 868 handleClientMessage(e->xclient);
854 break; 869 break;
855 default: { 870 default: {
871#ifdef HAVE_RANDR
872 if (e->type == m_randr_event_type) {
873 // update root window size in screen
874 BScreen *scr = searchScreen(e->xany.window);
875 if (scr != 0)
876 scr->updateSize();
877 }
878#endif // HAVE_RANDR
879
856 } 880 }
857 881
858 } 882 }
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 25ffeea..503e55c 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.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: fluxbox.hh,v 1.56 2003/05/11 22:18:33 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.57 2003/05/12 04:23:31 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -268,6 +268,7 @@ private:
268 bool m_starting; 268 bool m_starting;
269 bool m_shutdown; 269 bool m_shutdown;
270 int m_server_grabs; 270 int m_server_grabs;
271 int m_randr_event_type; ///< the type number of randr event
271 const char *m_RC_PATH; 272 const char *m_RC_PATH;
272 const char *m_RC_INIT_FILE; 273 const char *m_RC_INIT_FILE;
273}; 274};