Changeset 5f822cacbfc32f33be99a0effecd375a37b2a2cb
- Timestamp:
- 10/11/2006 05:31:30 AM
(2 years ago)
- Author:
- daf <daf>
- git-committer:
- daf <daf> 1160569890 +0000
- git-parent:
[e0ef99d70db4b0a6aeac48795c5ca986a428b1f8]
- git-author:
- daf <daf> 1160569890 +0000
- Message:
Autotools foo for Xinerama
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0378f20 |
r5f822ca |
|
| | 1 | Tue Oct 10 21:14:46 EDT 2006 Dave Foster <daf@minuslab.net> |
|---|
| | 2 | * Tried to introduce some autotools foo to deal with Xinerama |
|---|
| | 3 | better. |
|---|
| | 4 | |
|---|
| 1 | 5 | Thu Sep 28 14:25:56 EDT 2006 Dave Foster <daf@minuslab.net> |
|---|
| 2 | 6 | * Fixed a major bug that I introduced into single display code, |
|---|
| rde2583a |
r5f822ca |
|
| 9 | 9 | sh libtoolize --copy --force --automake |
|---|
| 10 | 10 | sh autoconf |
|---|
| | 11 | sh autoheader |
|---|
| 11 | 12 | sh automake --include-deps --add-missing --copy |
|---|
| 12 | 13 | |
|---|
| rde2583a |
r5f822ca |
|
| 35 | 35 | NITROGEN_CFLAGS="$GLIB2_CFLAGS $GTK2_CFLAGS $GTKMM2_CFLAGS $GTHREAD2_CFLAGS" |
|---|
| 36 | 36 | |
|---|
| 37 | | AC_SUBST(NITROGEN_LIBS) |
|---|
| 38 | | AC_SUBST(NITROGEN_CFLAGS) |
|---|
| 39 | | |
|---|
| 40 | 37 | dnl do some autotools picen to get inotify |
|---|
| 41 | | AC_ARG_ENABLE(inotify, [ --disable-inotify disable support for inotify watching of dirs (default: enable)], [enable_inotify=$enableval],[enable_inotify=yes]) |
|---|
| | 38 | AC_ARG_ENABLE(inotify, [ --disable-inotify disable support for inotify watching of dirs (default: enabled)], [enable_inotify=$enableval],[enable_inotify=yes]) |
|---|
| 42 | 39 | |
|---|
| 43 | 40 | if test x$enable_inotify = xyes; then |
|---|
| 44 | 41 | AC_DEFINE(USE_INOTIFY, 1, [Define to enable inotify dir watching]) |
|---|
| 45 | 42 | fi |
|---|
| | 43 | |
|---|
| | 44 | dnl now do some proper checking for Xinerama |
|---|
| | 45 | AC_ARG_ENABLE(xinerama, [ --disable-xinerama disable support for Xinerama (default: enabled)], [enable_xinerama=$xineramaval],[enable_xinerama=yes]) |
|---|
| | 46 | |
|---|
| | 47 | if test x$enable_xinerama = xyes; then |
|---|
| | 48 | AC_CHECK_LIB(Xinerama, XineramaQueryScreens, |
|---|
| | 49 | [AC_DEFINE(USE_XINERAMA, 1, [Define to enable Xinerama]) |
|---|
| | 50 | NITROGEN_LIBS="$NITROGEN_LIBS -lXinerama"], |
|---|
| | 51 | [enable_xinerama=no]) |
|---|
| | 52 | fi |
|---|
| | 53 | |
|---|
| | 54 | AC_SUBST(NITROGEN_LIBS) |
|---|
| | 55 | AC_SUBST(NITROGEN_CFLAGS) |
|---|
| 46 | 56 | |
|---|
| 47 | 57 | AC_CONFIG_FILES(Makefile src/Makefile) |
|---|
| … | … | |
| 61 | 71 | fi |
|---|
| 62 | 72 | |
|---|
| | 73 | if test x$enable_xinerama = xyes; then |
|---|
| | 74 | echo "xinerama support ............ enabled" |
|---|
| | 75 | else |
|---|
| | 76 | echo "xinerama support ............ disabled" |
|---|
| | 77 | fi |
|---|
| | 78 | |
|---|
| 63 | 79 | echo "" |
|---|
| 64 | 80 | echo "##########################################" |
|---|
| re0ef99d |
r5f822ca |
|
| 24 | 24 | #include <sys/types.h> |
|---|
| 25 | 25 | #include <sys/wait.h> |
|---|
| | 26 | |
|---|
| | 27 | #ifdef USE_XINERAMA |
|---|
| 26 | 28 | #include <X11/extensions/Xinerama.h> |
|---|
| | 29 | #endif |
|---|
| 27 | 30 | |
|---|
| 28 | 31 | // leethax constructor |
|---|
| 29 | 32 | |
|---|
| 30 | | NWindow::NWindow (void) : apply (Gtk::Stock::APPLY), cb_save("Sa_ve"), is_multihead(false) { |
|---|
| | 33 | NWindow::NWindow (void) : apply (Gtk::Stock::APPLY), cb_save("Sa_ve"), is_multihead(false), is_xinerama(false) { |
|---|
| 31 | 34 | |
|---|
| 32 | 35 | set_border_width (5); |
|---|
| … | … | |
| 169 | 172 | } |
|---|
| 170 | 173 | |
|---|
| | 174 | #ifdef USE_XINERAMA |
|---|
| 171 | 175 | // xinerama |
|---|
| 172 | 176 | int event_base, error_base; |
|---|
| … | … | |
| 194 | 198 | return; |
|---|
| 195 | 199 | } |
|---|
| | 200 | #endif |
|---|
| 196 | 201 | |
|---|
| 197 | 202 | // if we made it here, we do not have any kidn of multihead |
|---|
| r3071726 |
r5f822ca |
|
| 70 | 70 | Glib::RefPtr<Gdk::Display> disp = manager->get_default_display(); |
|---|
| 71 | 71 | |
|---|
| | 72 | #ifdef USE_XINERAMA |
|---|
| 72 | 73 | XineramaScreenInfo* xinerama_info; |
|---|
| 73 | 74 | gint xinerama_num_screens; |
|---|
| … | … | |
| 109 | 110 | } |
|---|
| 110 | 111 | } |
|---|
| 111 | | } else { |
|---|
| 112 | | |
|---|
| 113 | | for (int n=0; n<disp->get_n_screens(); n++) { |
|---|
| | 112 | |
|---|
| | 113 | // must return here becuase not all systems have xinerama |
|---|
| | 114 | program_log("leaving set_saved_bgs()"); |
|---|
| | 115 | return; |
|---|
| | 116 | } |
|---|
| | 117 | #endif |
|---|
| | 118 | |
|---|
| | 119 | for (int n=0; n<disp->get_n_screens(); n++) { |
|---|
| 114 | 120 | |
|---|
| 115 | | display = disp->get_screen(n)->make_display_name(); |
|---|
| 116 | | |
|---|
| 117 | | program_log("display: %s", display.c_str()); |
|---|
| | 121 | display = disp->get_screen(n)->make_display_name(); |
|---|
| | 122 | |
|---|
| | 123 | program_log("display: %s", display.c_str()); |
|---|
| 118 | 124 | |
|---|
| 119 | | if (cfg->get_bg(display, file, mode, bgcolor)) { |
|---|
| | 125 | if (cfg->get_bg(display, file, mode, bgcolor)) { |
|---|
| 120 | 126 | |
|---|
| 121 | | program_log("setting bg on %s to %s (mode: %d)", display.c_str(), file.c_str(), mode); |
|---|
| 122 | | SetBG::set_bg(display, file, mode, bgcolor); |
|---|
| 123 | | program_log("set bg on %s to %s (mode: %d)", display.c_str(), file.c_str(), mode); |
|---|
| | 127 | program_log("setting bg on %s to %s (mode: %d)", display.c_str(), file.c_str(), mode); |
|---|
| | 128 | SetBG::set_bg(display, file, mode, bgcolor); |
|---|
| | 129 | program_log("set bg on %s to %s (mode: %d)", display.c_str(), file.c_str(), mode); |
|---|
| 124 | 130 | |
|---|
| 125 | | } else { |
|---|
| 126 | | std::cerr << "Could not get bg info" << std::endl; |
|---|
| 127 | | } |
|---|
| | 131 | } else { |
|---|
| | 132 | std::cerr << "Could not get bg info" << std::endl; |
|---|
| 128 | 133 | } |
|---|
| 129 | 134 | } |
|---|