diff options
author | fluxgen <fluxgen> | 2002-08-17 22:14:00 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-08-17 22:14:00 (GMT) |
commit | 033a6dc46275923dbaf125d8e87de606eee10f09 (patch) | |
tree | 6f7445a713dc597036fbb64ee03ff1f88e73c2f4 | |
parent | 6664591b56e34921eb8f4336c21ecd0a94c6e084 (diff) | |
download | fluxbox_paul-033a6dc46275923dbaf125d8e87de606eee10f09.zip fluxbox_paul-033a6dc46275923dbaf125d8e87de606eee10f09.tar.bz2 |
initiate cursors and changed to FbTk EventHandler with SignalEvent
-rw-r--r-- | src/fluxbox.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index aefd719..20f55fd 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,8 @@ | |||
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.69 2002/08/16 11:09:25 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.70 2002/08/17 22:14:00 fluxgen Exp $ |
26 | |||
26 | 27 | ||
27 | #include "fluxbox.hh" | 28 | #include "fluxbox.hh" |
28 | 29 | ||
@@ -38,7 +39,6 @@ | |||
38 | #include "StringUtil.hh" | 39 | #include "StringUtil.hh" |
39 | #include "Resource.hh" | 40 | #include "Resource.hh" |
40 | #include "XrmDatabaseHelper.hh" | 41 | #include "XrmDatabaseHelper.hh" |
41 | |||
42 | #ifdef SLIT | 42 | #ifdef SLIT |
43 | #include "Slit.hh" | 43 | #include "Slit.hh" |
44 | #endif // SLIT | 44 | #endif // SLIT |
@@ -52,12 +52,13 @@ | |||
52 | #include "../config.h" | 52 | #include "../config.h" |
53 | #endif // HAVE_CONFIG_H | 53 | #endif // HAVE_CONFIG_H |
54 | 54 | ||
55 | // X headers | ||
55 | #include <X11/Xlib.h> | 56 | #include <X11/Xlib.h> |
56 | #include <X11/Xutil.h> | 57 | #include <X11/Xutil.h> |
57 | #include <X11/Xresource.h> | 58 | #include <X11/Xresource.h> |
58 | #include <X11/Xatom.h> | 59 | #include <X11/Xatom.h> |
59 | #include <X11/keysym.h> | 60 | #include <X11/keysym.h> |
60 | 61 | #include <X11/cursorfont.h> | |
61 | #ifdef SHAPE | 62 | #ifdef SHAPE |
62 | #include <X11/extensions/shape.h> | 63 | #include <X11/extensions/shape.h> |
63 | #endif // SHAPE | 64 | #endif // SHAPE |
@@ -389,6 +390,11 @@ key(0) | |||
389 | 390 | ||
390 | throw static_cast<int>(3); | 391 | throw static_cast<int>(3); |
391 | } | 392 | } |
393 | //setup cursor bitmaps | ||
394 | cursor.session = XCreateFontCursor(getXDisplay(), XC_left_ptr); | ||
395 | cursor.move = XCreateFontCursor(getXDisplay(), XC_fleur); | ||
396 | cursor.ll_angle = XCreateFontCursor(getXDisplay(), XC_ll_angle); | ||
397 | cursor.lr_angle = XCreateFontCursor(getXDisplay(), XC_lr_angle); | ||
392 | 398 | ||
393 | XSynchronize(getXDisplay(), False); | 399 | XSynchronize(getXDisplay(), False); |
394 | XSync(getXDisplay(), False); | 400 | XSync(getXDisplay(), False); |
@@ -525,7 +531,7 @@ void Fluxbox::setupConfigFiles() { | |||
525 | } | 531 | } |
526 | } | 532 | } |
527 | 533 | ||
528 | void Fluxbox::process_event(XEvent *e) { | 534 | void Fluxbox::handleEvent(XEvent * const e) { |
529 | 535 | ||
530 | if ((masked == e->xany.window) && masked_window && | 536 | if ((masked == e->xany.window) && masked_window && |
531 | (e->type == MotionNotify)) { | 537 | (e->type == MotionNotify)) { |
@@ -1570,11 +1576,11 @@ bool Fluxbox::checkNETWMAtoms(XClientMessageEvent &ce) { | |||
1570 | } | 1576 | } |
1571 | #endif //!NEWWMSPEC | 1577 | #endif //!NEWWMSPEC |
1572 | 1578 | ||
1573 | void Fluxbox::handleSignal(int sig) { | 1579 | void Fluxbox::handleEvent(SignalEvent * const sig) { |
1574 | I18n *i18n = I18n::instance(); | 1580 | I18n *i18n = I18n::instance(); |
1575 | static int re_enter = 0; | 1581 | static int re_enter = 0; |
1576 | 1582 | ||
1577 | switch (sig) { | 1583 | switch (sig->signum) { |
1578 | case SIGCHLD: // we don't want the child process to kill us | 1584 | case SIGCHLD: // we don't want the child process to kill us |
1579 | waitpid(-1, 0, WNOHANG | WUNTRACED); | 1585 | waitpid(-1, 0, WNOHANG | WUNTRACED); |
1580 | break; | 1586 | break; |