all repos — fluxbox @ 3e1ac648d0f9dfe060091dc1f0c6e654064f4f7f

custom fork of the fluxbox windowmanager

using FbRootWindow
fluxgen fluxgen
commit

3e1ac648d0f9dfe060091dc1f0c6e654064f4f7f

parent

03c52ee0c4836eb6b9669975e8fd2cc0ee86f3b1

6 files changed, 42 insertions(+), 43 deletions(-)

jump to
M src/Ewmh.ccsrc/Ewmh.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.20 2003/05/10 13:21:36 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.21 2003/05/10 22:56:48 fluxgen Exp $ #include "Ewmh.hh"

@@ -50,13 +50,13 @@ Display *disp = FbTk::App::instance()->display();

Window wincheck = XCreateSimpleWindow(disp, - screen.getRootWindow(), + screen.rootWindow().window(), 0, 0, 5, 5, 0, 0, 0); if (wincheck != None) { m_windows.push_back(wincheck); - XChangeProperty(disp, screen.getRootWindow(), m_net_supporting_wm_check, XA_WINDOW, 32, + XChangeProperty(disp, screen.rootWindow().window(), m_net_supporting_wm_check, XA_WINDOW, 32, PropModeReplace, (unsigned char *) &wincheck, 1); XChangeProperty(disp, wincheck, m_net_supporting_wm_check, XA_WINDOW, 32, PropModeReplace, (unsigned char *) &wincheck, 1);

@@ -86,7 +86,7 @@ m_net_desktop_names,

m_net_supporting_wm_check }; - XChangeProperty(disp, screen.getRootWindow(), + XChangeProperty(disp, screen.rootWindow().window(), m_net_supported, XA_ATOM, 32, PropModeReplace, (unsigned char *) &atomsupported,

@@ -193,7 +193,7 @@

//number of windows to show in client list num = win; XChangeProperty(FbTk::App::instance()->display(), - screen.getRootWindow(), + screen.rootWindow().window(), m_net_client_list, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)wl, num);

@@ -213,7 +213,7 @@ strcpy(names[i], screen.getWorkspaceNames()[i].c_str());

} if (XStringListToTextProperty(names, number_of_desks, &text)) { - XSetTextProperty(FbTk::App::instance()->display(), screen.getRootWindow(), + XSetTextProperty(FbTk::App::instance()->display(), screen.rootWindow().window(), &text, m_net_desktop_names); XFree(text.value); }

@@ -225,7 +225,7 @@

void Ewmh::updateCurrentWorkspace(BScreen &screen) { size_t workspace = screen.getCurrentWorkspaceID(); XChangeProperty(FbTk::App::instance()->display(), - screen.getRootWindow(), + screen.rootWindow().window(), m_net_current_desktop, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&workspace, 1);

@@ -233,7 +233,7 @@ }

void Ewmh::updateWorkspaceCount(BScreen &screen) { size_t numworkspaces = screen.getCount(); - XChangeProperty(FbTk::App::instance()->display(), screen.getRootWindow(), + XChangeProperty(FbTk::App::instance()->display(), screen.rootWindow().window(), m_net_number_of_desktops, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&numworkspaces, 1); }
M src/Gnome.ccsrc/Gnome.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Gnome.cc,v 1.19 2003/05/08 02:50:38 rathnor Exp $ +// $Id: Gnome.cc,v 1.20 2003/05/10 22:57:37 fluxgen Exp $ #include "Gnome.hh"

@@ -51,9 +51,9 @@ void Gnome::initForScreen(BScreen &screen) {

Display *disp = FbTk::App::instance()->display(); // create the GNOME window Window gnome_win = XCreateSimpleWindow(disp, - screen.getRootWindow(), 0, 0, 5, 5, 0, 0, 0); + screen.rootWindow().window(), 0, 0, 5, 5, 0, 0, 0); // supported WM check - XChangeProperty(disp, screen.getRootWindow(), + XChangeProperty(disp, screen.rootWindow().window(), m_gnome_wm_supporting_wm_check, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &gnome_win, 1);

@@ -71,7 +71,7 @@ m_gnome_wm_win_layer

}; //list atoms that we support - XChangeProperty(disp, screen.getRootWindow(), + XChangeProperty(disp, screen.rootWindow().window(), m_gnome_wm_prot, XA_ATOM, 32, PropModeReplace, (unsigned char *)gnomeatomlist, (sizeof gnomeatomlist)/sizeof gnomeatomlist[0]);

@@ -173,7 +173,7 @@ }

//number of windows to show in client list num = win; XChangeProperty(FbTk::App::instance()->display(), - screen.getRootWindow(), + screen.rootWindow().window(), m_gnome_wm_win_client_list, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)wl, num);

@@ -195,7 +195,7 @@ strcpy(names[i], s);

} if (XStringListToTextProperty(names, number_of_desks, &text)) { - XSetTextProperty(FbTk::App::instance()->display(), screen.getRootWindow(), + XSetTextProperty(FbTk::App::instance()->display(), screen.rootWindow().window(), &text, m_gnome_wm_win_workspace_names); XFree(text.value); }

@@ -207,7 +207,7 @@

void Gnome::updateCurrentWorkspace(BScreen &screen) { int workspace = screen.getCurrentWorkspaceID(); XChangeProperty(FbTk::App::instance()->display(), - screen.getRootWindow(), + screen.rootWindow().window(), m_gnome_wm_win_workspace, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&workspace, 1);

@@ -216,7 +216,7 @@ }

void Gnome::updateWorkspaceCount(BScreen &screen) { int numworkspaces = screen.getCount(); - XChangeProperty(FbTk::App::instance()->display(), screen.getRootWindow(), + XChangeProperty(FbTk::App::instance()->display(), screen.rootWindow().window(), m_gnome_wm_win_workspace_count, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&numworkspaces, 1); }
M src/IconBar.ccsrc/IconBar.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconBar.cc,v 1.32 2003/04/28 16:48:22 rathnor Exp $ +// $Id: IconBar.cc,v 1.33 2003/05/10 22:55:10 fluxgen Exp $ #include "IconBar.hh"

@@ -294,15 +294,16 @@ attrib.background_pixmap = None;

attrib.background_pixel = attrib.border_pixel = BlackPixel(m_display, screen().getScreenNumber()); - // fluxboxwin->getScreen().getWindowStyle()->tab.border_color.pixel(); - attrib.colormap = fluxboxwin->getScreen().colormap(); + // fluxboxwin->screen().getWindowStyle()->tab.border_color.pixel(); + attrib.colormap = fluxboxwin->screen().rootWindow().colormap(); attrib.override_redirect = True; attrib.event_mask = ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | ExposureMask | EnterWindowMask; //create iconwindow Window iconwin = XCreateWindow(m_display, parent, 0, 0, 1, 1, 0, - fluxboxwin->getScreen().getDepth(), InputOutput, fluxboxwin->getScreen().getVisual(), + fluxboxwin->screen().rootWindow().depth(), + InputOutput, fluxboxwin->screen().rootWindow().visual(), attrib_mask, &attrib); return iconwin;
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.151 2003/05/10 18:15:23 fluxgen Exp $ +// $Id: Screen.cc,v 1.152 2003/05/10 22:52:44 fluxgen Exp $ #include "Screen.hh"

@@ -512,6 +512,7 @@ m_menutheme(new FbTk::MenuTheme(scrn)),

m_root_theme(new RootTheme(scrn, *resource.rootcommand)), + m_root_window(scrn), resource(rm, screenname, altscreenname), m_toolbarhandler(0) {

@@ -523,7 +524,7 @@ SubstructureRedirectMask | KeyPressMask | KeyReleaseMask |

ButtonPressMask | ButtonReleaseMask| SubstructureNotifyMask; XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); - XSelectInput(disp, getRootWindow(), event_mask); + rootWindow().setEventMask(event_mask); XSync(disp, False); XSetErrorHandler((XErrorHandler) old);

@@ -539,14 +540,14 @@ getMessage(

FBNLS::ScreenSet, FBNLS::ScreenManagingScreen, "BScreen::BScreen: managing screen %d " "using visual 0x%lx, depth %d\n"), - getScreenNumber(), XVisualIDFromVisual(getVisual()), - getDepth()); + getScreenNumber(), XVisualIDFromVisual(rootWindow().visual()), + rootWindow().depth()); Fluxbox * const fluxbox = Fluxbox::instance(); #ifdef HAVE_GETPID pid_t bpid = getpid(); - XChangeProperty(disp, getRootWindow(), + XChangeProperty(disp, rootWindow().window(), Fluxbox::instance()->getFluxboxPidAtom(), XA_CARDINAL, sizeof(pid_t) * 8, PropModeReplace, (unsigned char *) &bpid, 1);

@@ -555,7 +556,7 @@

cycling_window = focused_list.end(); - XDefineCursor(disp, getRootWindow(), fluxbox->getSessionCursor()); + XDefineCursor(disp, rootWindow().window(), fluxbox->getSessionCursor()); image_control = new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(),

@@ -591,13 +592,13 @@

XSetWindowAttributes attrib; unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder; attrib.border_pixel = m_root_theme->borderColor().pixel(); - attrib.colormap = colormap(); + attrib.colormap = rootWindow().colormap(); attrib.save_under = true; geom_window = - XCreateWindow(disp, getRootWindow(), - 0, 0, geom_w, geom_h, rootTheme().borderWidth(), getDepth(), - InputOutput, getVisual(), mask, &attrib); + XCreateWindow(disp, rootWindow().window(), + 0, 0, geom_w, geom_h, rootTheme().borderWidth(), rootWindow().depth(), + InputOutput, rootWindow().visual(), mask, &attrib); geom_visible = false; if (winFrameTheme().labelFocusTexture().type() & FbTk::Texture::PARENTRELATIVE) {

@@ -675,7 +676,7 @@

int i; unsigned int nchild; Window r, p, *children; - XQueryTree(disp, getRootWindow(), &r, &p, &children, &nchild); + XQueryTree(disp, rootWindow().window(), &r, &p, &children, &nchild); // preen the window list of all icon windows... for better dockapp support for (i = 0; i < (int) nchild; i++) {

@@ -787,7 +788,7 @@ Atom real_type;

int real_format; unsigned long items_read, items_left; unsigned int *data; - if (XGetWindowProperty(disp, getRootWindow(), + if (XGetWindowProperty(disp, rootWindow().window(), XInternAtom(disp, "_XROOTPMAP_ID", false), 0L, 1L, false, XA_PIXMAP, &real_type,

@@ -2270,15 +2271,12 @@ }

void BScreen::shutdown() { Display *disp = FbTk::App::instance()->display(); - XSelectInput(disp, getRootWindow(), NoEventMask); + rootWindow().setEventMask(NoEventMask); XSync(disp, False); for_each(workspacesList.begin(), workspacesList.end(), mem_fun(&Workspace::shutdown)); - - - #ifdef SLIT if (m_slit.get())
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.47 2003/05/07 22:52:36 fluxgen Exp $ +// $Id: Slit.cc,v 1.48 2003/05/10 22:53:57 fluxgen Exp $ #include "Slit.hh"

@@ -297,7 +297,7 @@ CWColormap | CWOverrideRedirect | CWEventMask;

attrib.background_pixmap = None; attrib.background_pixel = attrib.border_pixel = screen().rootTheme().borderColor().pixel(); - attrib.colormap = screen().colormap(); + attrib.colormap = screen().rootWindow().colormap(); attrib.override_redirect = True; attrib.event_mask = SubstructureRedirectMask | ButtonPressMask | EnterWindowMask | LeaveWindowMask;

@@ -306,9 +306,9 @@ frame.x = frame.y = 0;

frame.width = frame.height = 1; Display *disp = FbTk::App::instance()->display(); frame.window = - XCreateWindow(disp, screen().getRootWindow(), frame.x, frame.y, + XCreateWindow(disp, screen().rootWindow().window(), frame.x, frame.y, frame.width, frame.height, screen().rootTheme().borderWidth(), - screen().getDepth(), InputOutput, screen().getVisual(), + screen().rootWindow().depth(), InputOutput, screen().rootWindow().visual(), create_mask, &attrib); FbTk::EventManager::instance()->add(*this, frame.window);

@@ -518,7 +518,7 @@

client->disableEvents(); // stop events to frame.window temporarly frame.window.setEventMask(NoEventMask); - XReparentWindow(disp, client->window, screen().getRootWindow(), + XReparentWindow(disp, client->window, screen().rootWindow().window(), client->x, client->y); XChangeSaveSet(disp, client->window, SetModeDelete); // reactivate events to frame.window
M src/WinClient.ccsrc/WinClient.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WinClient.cc,v 1.7 2003/05/07 16:21:26 rathnor Exp $ +// $Id: WinClient.cc,v 1.8 2003/05/10 22:59:32 fluxgen Exp $ #include "WinClient.hh"

@@ -194,7 +194,7 @@ // we can't be transient to ourself

if (win == window()) return; - if (win != None && m_win->getScreen().getRootWindow() == win) { + if (win != None && m_win->screen().rootWindow() == win) { modal = true; return; // transient for root window... }