2002-01-09 14:11:20 +00:00
|
|
|
// Screen.hh for Fluxbox Window Manager
|
2006-02-16 06:53:05 +00:00
|
|
|
// Copyright (c) 2001 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
2005-01-24 17:14:24 +00:00
|
|
|
//
|
2001-12-11 20:47:02 +00:00
|
|
|
// Screen.hh for Blackbox - an X11 Window manager
|
2002-12-13 20:16:17 +00:00
|
|
|
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)
|
2001-12-11 20:47:02 +00:00
|
|
|
//
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
// copy of this software and associated documentation files (the "Software"),
|
|
|
|
// to deal in the Software without restriction, including without limitation
|
|
|
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
// and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
// Software is furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2002-05-08 14:25:40 +00:00
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
2001-12-11 20:47:02 +00:00
|
|
|
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// 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.
|
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
#ifndef SCREEN_HH
|
|
|
|
#define SCREEN_HH
|
2002-01-04 21:21:43 +00:00
|
|
|
|
2006-03-22 12:23:17 +00:00
|
|
|
#include "FbWinFrame.hh"
|
2003-05-10 22:45:08 +00:00
|
|
|
#include "FbRootWindow.hh"
|
2008-01-05 01:39:19 +00:00
|
|
|
#include "RootTheme.hh"
|
|
|
|
#include "WinButtonTheme.hh"
|
|
|
|
#include "FbWinFrameTheme.hh"
|
2008-05-05 12:05:52 +00:00
|
|
|
#include "TooltipWindow.hh"
|
2001-12-11 20:47:02 +00:00
|
|
|
|
2007-12-28 07:16:17 +00:00
|
|
|
#include "FbTk/MenuTheme.hh"
|
2007-03-04 17:47:37 +00:00
|
|
|
#include "FbTk/EventHandler.hh"
|
2003-12-19 00:34:23 +00:00
|
|
|
#include "FbTk/Resource.hh"
|
|
|
|
#include "FbTk/Subject.hh"
|
|
|
|
#include "FbTk/MultLayers.hh"
|
|
|
|
#include "FbTk/NotCopyable.hh"
|
|
|
|
#include "FbTk/Observer.hh"
|
|
|
|
|
2002-01-10 12:49:15 +00:00
|
|
|
#include <X11/Xresource.h>
|
|
|
|
|
2004-08-31 15:26:40 +00:00
|
|
|
#ifdef HAVE_CSTDIO
|
|
|
|
#include <cstdio>
|
|
|
|
#else
|
|
|
|
#include <stdio.h>
|
|
|
|
#endif
|
2002-02-08 13:35:20 +00:00
|
|
|
#include <list>
|
|
|
|
#include <vector>
|
2002-01-27 12:45:32 +00:00
|
|
|
#include <fstream>
|
2002-10-25 20:56:12 +00:00
|
|
|
#include <memory>
|
2003-12-19 00:34:23 +00:00
|
|
|
#include <map>
|
2002-10-25 20:56:12 +00:00
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
class ClientPattern;
|
|
|
|
class Focusable;
|
2003-12-19 00:34:23 +00:00
|
|
|
class FluxboxWindow;
|
2003-04-14 12:13:36 +00:00
|
|
|
class WinClient;
|
2003-04-25 11:02:57 +00:00
|
|
|
class Workspace;
|
2003-06-18 13:42:21 +00:00
|
|
|
class Strut;
|
2003-06-20 01:30:08 +00:00
|
|
|
class Slit;
|
2008-01-12 06:36:38 +00:00
|
|
|
class Toolbar;
|
2004-09-11 13:33:07 +00:00
|
|
|
class HeadArea;
|
2006-02-18 11:39:38 +00:00
|
|
|
class FocusControl;
|
2007-10-24 17:09:26 +00:00
|
|
|
class ScreenPlacement;
|
2008-05-09 17:39:02 +00:00
|
|
|
class TooltipWindow;
|
|
|
|
class OSDWindow;
|
2002-01-27 12:45:32 +00:00
|
|
|
|
2003-01-07 02:03:57 +00:00
|
|
|
namespace FbTk {
|
2003-01-09 17:38:40 +00:00
|
|
|
class Menu;
|
2003-01-10 00:35:19 +00:00
|
|
|
class ImageControl;
|
2003-04-26 14:47:40 +00:00
|
|
|
class XLayerItem;
|
2003-05-19 15:32:47 +00:00
|
|
|
class FbWindow;
|
2003-08-25 13:15:53 +00:00
|
|
|
class Subject;
|
2003-12-19 00:34:23 +00:00
|
|
|
}
|
2003-01-07 02:03:57 +00:00
|
|
|
|
2008-05-09 17:39:02 +00:00
|
|
|
|
2003-04-25 11:02:57 +00:00
|
|
|
/// Handles screen connection, screen clients and workspaces
|
2002-12-13 20:16:17 +00:00
|
|
|
/**
|
2003-06-25 05:47:23 +00:00
|
|
|
Create workspaces, handles switching between workspaces and windows
|
2002-12-13 20:16:17 +00:00
|
|
|
*/
|
2007-03-04 17:47:37 +00:00
|
|
|
class BScreen: public FbTk::EventHandler, public FbTk::Observer,
|
|
|
|
private FbTk::NotCopyable {
|
2001-12-11 20:47:02 +00:00
|
|
|
public:
|
2006-02-18 11:39:38 +00:00
|
|
|
/// a window becomes active / focussed on a different workspace
|
2007-12-29 21:38:53 +00:00
|
|
|
enum FollowModel {
|
2004-10-16 22:18:56 +00:00
|
|
|
IGNORE_OTHER_WORKSPACES = 0, ///< who cares?
|
2007-10-13 21:51:37 +00:00
|
|
|
FOLLOW_ACTIVE_WINDOW, ///< go to that workspace
|
2006-08-02 22:02:31 +00:00
|
|
|
SEMIFOLLOW_ACTIVE_WINDOW, ///< fetch iconified windows, else follow
|
2007-12-29 21:38:53 +00:00
|
|
|
FETCH_ACTIVE_WINDOW ///< put that window to the current workspace
|
2004-10-16 22:18:56 +00:00
|
|
|
};
|
2006-02-18 11:39:38 +00:00
|
|
|
|
2003-12-19 00:34:23 +00:00
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
typedef std::list<FluxboxWindow *> Icons;
|
2006-02-18 11:39:38 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
typedef std::vector<Workspace *> Workspaces;
|
|
|
|
typedef std::vector<std::string> WorkspaceNames;
|
2006-05-20 15:08:14 +00:00
|
|
|
typedef std::list<std::pair<FbTk::FbString, FbTk::Menu *> > ExtraMenus;
|
2003-06-18 13:42:21 +00:00
|
|
|
|
2003-05-18 22:04:06 +00:00
|
|
|
BScreen(FbTk::ResourceManager &rm,
|
2002-12-01 13:42:15 +00:00
|
|
|
const std::string &screenname, const std::string &altscreenname,
|
2003-02-03 13:50:35 +00:00
|
|
|
int scrn, int number_of_layers);
|
2002-12-01 13:42:15 +00:00
|
|
|
~BScreen();
|
|
|
|
|
2004-04-19 22:44:42 +00:00
|
|
|
void initWindows();
|
2004-05-02 21:12:22 +00:00
|
|
|
void initMenus();
|
2006-02-18 11:39:38 +00:00
|
|
|
|
2005-07-20 18:29:01 +00:00
|
|
|
bool isRootColormapInstalled() const { return root_colormap_installed; }
|
|
|
|
bool isScreenManaged() const { return managed; }
|
|
|
|
bool isWorkspaceWarping() const { return *resource.workspace_warping; }
|
|
|
|
bool doAutoRaise() const { return *resource.auto_raise; }
|
|
|
|
bool clickRaises() const { return *resource.click_raises; }
|
|
|
|
bool doOpaqueMove() const { return *resource.opaque_move; }
|
|
|
|
bool doFullMax() const { return *resource.full_max; }
|
2007-10-13 21:51:37 +00:00
|
|
|
bool getMaxIgnoreIncrement() const { return *resource.max_ignore_inc; }
|
|
|
|
bool getMaxDisableMove() const { return *resource.max_disable_move; }
|
|
|
|
bool getMaxDisableResize() const { return *resource.max_disable_resize; }
|
2005-07-20 18:29:01 +00:00
|
|
|
bool doShowWindowPos() const { return *resource.show_window_pos; }
|
|
|
|
bool decorateTransient() const { return *resource.decorate_transient; }
|
2007-03-06 17:20:13 +00:00
|
|
|
const std::string &defaultDeco() const { return *resource.default_deco; }
|
2005-07-20 18:29:01 +00:00
|
|
|
const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
|
|
|
|
FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
|
2005-06-23 03:07:25 +00:00
|
|
|
// menus
|
2005-07-04 18:18:32 +00:00
|
|
|
const FbTk::Menu &rootMenu() const { return *m_rootmenu.get(); }
|
|
|
|
FbTk::Menu &rootMenu() { return *m_rootmenu.get(); }
|
2004-05-02 21:12:22 +00:00
|
|
|
const FbTk::Menu &configMenu() const { return *m_configmenu.get(); }
|
|
|
|
FbTk::Menu &configMenu() { return *m_configmenu.get(); }
|
2005-06-23 03:07:25 +00:00
|
|
|
const FbTk::Menu &windowMenu() const { return *m_windowmenu.get(); }
|
|
|
|
FbTk::Menu &windowMenu() { return *m_windowmenu.get(); }
|
|
|
|
ExtraMenus &extraWindowMenus() { return m_extramenus; }
|
|
|
|
const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2006-03-22 12:23:17 +00:00
|
|
|
FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; }
|
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
unsigned int noFocusWhileTypingDelay() const { return *resource.typing_delay; }
|
|
|
|
FollowModel getFollowModel() const { return *resource.follow_model; }
|
|
|
|
FollowModel getUserFollowModel() const { return *resource.user_follow_model; }
|
2002-12-01 13:42:15 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
const std::string &getScrollAction() const { return *resource.scroll_action; }
|
|
|
|
const bool getScrollReverse() const { return *resource.scroll_reverse; }
|
|
|
|
const bool allowRemoteActions() const { return *resource.allow_remote_actions; }
|
|
|
|
const bool clientMenuUsePixmap() const { return *resource.clientmenu_use_pixmap; }
|
|
|
|
const bool getDefaultInternalTabs() const { return *resource.default_internal_tabs; }
|
|
|
|
const bool getTabsUsePixmap() const { return *resource.tabs_use_pixmap; }
|
|
|
|
const bool getMaxOverTabs() const { return *resource.max_over_tabs; }
|
2005-09-07 16:46:17 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
unsigned int getTabWidth() const { return *resource.tab_width; }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return the slit, @see Slit
|
2007-12-29 21:38:53 +00:00
|
|
|
Slit *slit() { return m_slit.get(); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return the slit, @see Slit
|
2007-12-29 21:38:53 +00:00
|
|
|
const Slit *slit() const { return m_slit.get(); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* @param w the workspace number
|
|
|
|
* @return workspace for the given workspace number
|
|
|
|
*/
|
2007-12-29 21:38:53 +00:00
|
|
|
Workspace *getWorkspace(unsigned int w) { return ( w < m_workspaces_list.size() ? m_workspaces_list[w] : 0); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* @param w the workspace number
|
|
|
|
* @return workspace for the given workspace number
|
|
|
|
*/
|
2007-12-29 21:38:53 +00:00
|
|
|
const Workspace *getWorkspace(unsigned int w) const {
|
2007-03-31 19:10:16 +00:00
|
|
|
return (w < m_workspaces_list.size() ? m_workspaces_list[w] : 0);
|
|
|
|
}
|
|
|
|
/// @return the current workspace
|
2007-12-29 21:38:53 +00:00
|
|
|
Workspace *currentWorkspace() { return m_current_workspace; }
|
|
|
|
const Workspace *currentWorkspace() const { return m_current_workspace; }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return the workspace menu
|
2005-07-04 18:18:32 +00:00
|
|
|
const FbTk::Menu &workspaceMenu() const { return *m_workspacemenu.get(); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return the workspace menu
|
2005-07-04 18:18:32 +00:00
|
|
|
FbTk::Menu &workspaceMenu() { return *m_workspacemenu.get(); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return focus control handler
|
2006-02-18 11:39:38 +00:00
|
|
|
const FocusControl &focusControl() const { return *m_focus_control; }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return focus control handler
|
2006-02-18 11:39:38 +00:00
|
|
|
FocusControl &focusControl() { return *m_focus_control; }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return the current workspace id
|
2003-05-15 12:00:46 +00:00
|
|
|
unsigned int currentWorkspaceID() const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
|
|
|
|
*
|
2003-01-05 22:24:55 +00:00
|
|
|
*/
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return maximum screen bound to the left for a specific xinerama head
|
2003-05-20 11:03:11 +00:00
|
|
|
unsigned int maxLeft(int head) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return maximum screen bound to the right for a specific xinerama head
|
2003-05-20 11:03:11 +00:00
|
|
|
unsigned int maxRight(int head) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return maximum screen bound at the top for the specified xinerama head
|
2003-05-20 11:03:11 +00:00
|
|
|
unsigned int maxTop(int head) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return maximum screen bound at bottom for the specified xinerama head
|
2003-05-20 11:03:11 +00:00
|
|
|
unsigned int maxBottom(int head) const;
|
2004-04-19 22:44:42 +00:00
|
|
|
/// @return true if window is kde dock app
|
|
|
|
bool isKdeDockapp(Window win) const;
|
|
|
|
/// @return true if dock app was added, else false
|
|
|
|
bool addKdeDockapp(Window win);
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return screen width, @see rootWindow()
|
2006-04-11 18:26:00 +00:00
|
|
|
unsigned int width() const { return rootWindow().width(); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return screen height, @see rootWindow()
|
2006-04-11 18:26:00 +00:00
|
|
|
unsigned int height() const { return rootWindow().height(); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return number of the screen, @see rootWindow()
|
2006-04-11 18:26:00 +00:00
|
|
|
int screenNumber() const { return rootWindow().screenNumber(); }
|
2002-08-30 14:03:31 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
/// @return number of workspaces
|
2006-04-02 21:37:44 +00:00
|
|
|
size_t numberOfWorkspaces() const { return m_workspaces_list.size(); }
|
2005-07-04 18:18:32 +00:00
|
|
|
|
2006-04-11 18:26:00 +00:00
|
|
|
const Icons &iconList() const { return m_icon_list; }
|
|
|
|
Icons &iconList() { return m_icon_list; }
|
2006-02-18 11:39:38 +00:00
|
|
|
|
2003-05-19 22:45:51 +00:00
|
|
|
const Workspaces &getWorkspacesList() const { return m_workspaces_list; }
|
2003-08-12 00:27:13 +00:00
|
|
|
Workspaces &getWorkspacesList() { return m_workspaces_list; }
|
2003-05-19 22:45:51 +00:00
|
|
|
const WorkspaceNames &getWorkspaceNames() const { return m_workspace_names; }
|
2002-12-13 20:16:17 +00:00
|
|
|
/**
|
|
|
|
@name Screen signals
|
|
|
|
*/
|
|
|
|
//@{
|
2002-12-01 13:42:15 +00:00
|
|
|
/// client list signal
|
2007-12-29 21:38:53 +00:00
|
|
|
FbTk::Subject &clientListSig() { return m_clientlist_sig; }
|
2003-09-08 16:37:27 +00:00
|
|
|
/// icon list sig
|
|
|
|
FbTk::Subject &iconListSig() { return m_iconlist_sig; }
|
2002-12-01 13:42:15 +00:00
|
|
|
/// workspace count signal
|
|
|
|
FbTk::Subject &workspaceCountSig() { return m_workspacecount_sig; }
|
2007-12-29 21:38:53 +00:00
|
|
|
/// workspace names signal
|
2002-12-01 13:42:15 +00:00
|
|
|
FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; }
|
2004-01-19 18:29:43 +00:00
|
|
|
/// workspace area signal
|
|
|
|
FbTk::Subject &workspaceAreaSig() { return m_workspace_area_sig; }
|
2002-12-01 13:42:15 +00:00
|
|
|
/// current workspace signal
|
|
|
|
FbTk::Subject ¤tWorkspaceSig() { return m_currentworkspace_sig; }
|
2007-11-12 21:59:43 +00:00
|
|
|
/// focused window signal
|
|
|
|
FbTk::Subject &focusedWindowSig() { return m_focusedwindow_sig; }
|
2003-07-01 12:39:09 +00:00
|
|
|
/// reconfigure signal
|
|
|
|
FbTk::Subject &reconfigureSig() { return m_reconfigure_sig; }
|
2003-08-24 13:07:01 +00:00
|
|
|
FbTk::Subject &resizeSig() { return m_resize_sig; }
|
2007-07-03 18:50:53 +00:00
|
|
|
FbTk::Subject &bgChangeSig() { return m_bg_change_sig; }
|
2002-12-13 20:16:17 +00:00
|
|
|
//@}
|
2003-08-25 13:15:53 +00:00
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
/// called when the screen receives a signal from a subject
|
2003-08-25 13:15:53 +00:00
|
|
|
void update(FbTk::Subject *subj);
|
|
|
|
|
2007-07-03 18:50:53 +00:00
|
|
|
void propertyNotify(Atom atom);
|
2007-03-04 17:47:37 +00:00
|
|
|
void keyPressEvent(XKeyEvent &ke);
|
|
|
|
void keyReleaseEvent(XKeyEvent &ke);
|
|
|
|
void buttonPressEvent(XButtonEvent &be);
|
|
|
|
void notifyUngrabKeyboard();
|
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Cycles focus of windows
|
|
|
|
* @param opts focus options
|
2007-10-13 21:51:37 +00:00
|
|
|
* @param pat specific pattern to match windows with
|
2007-03-31 19:10:16 +00:00
|
|
|
* @param reverse the order of cycling
|
|
|
|
*/
|
2007-10-13 21:51:37 +00:00
|
|
|
void cycleFocus(int opts = 0, const ClientPattern *pat = 0, bool reverse = false);
|
2007-03-04 17:47:37 +00:00
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Creates an empty menu with specified label
|
|
|
|
* @param label for the menu
|
|
|
|
* @return create menu
|
|
|
|
*/
|
2003-12-10 23:08:06 +00:00
|
|
|
FbTk::Menu *createMenu(const std::string &label);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Creates an empty toggle menu with a specific label
|
|
|
|
* @param label
|
|
|
|
* @return created menu
|
|
|
|
*/
|
2006-03-22 12:23:17 +00:00
|
|
|
FbTk::Menu *createToggleMenu(const std::string &label);
|
2007-03-31 19:10:16 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
/**
|
2007-03-31 19:10:16 +00:00
|
|
|
* For extras to add menus.
|
|
|
|
* These menus will be marked internal,
|
|
|
|
* and deleted when the window dies (as opposed to Screen
|
|
|
|
*/
|
2006-05-20 15:08:14 +00:00
|
|
|
void addExtraWindowMenu(const FbTk::FbString &label, FbTk::Menu *menu);
|
2003-12-10 23:08:06 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; }
|
2003-02-18 15:11:12 +00:00
|
|
|
|
2005-07-20 18:29:01 +00:00
|
|
|
void setRootColormapInstalled(bool r) { root_colormap_installed = r; }
|
|
|
|
|
2006-03-22 12:23:17 +00:00
|
|
|
void saveTabPlacement(FbWinFrame::TabPlacement place) { *resource.tab_placement = place; }
|
|
|
|
|
2005-07-20 18:29:01 +00:00
|
|
|
void saveWorkspaces(int w) { *resource.workspaces = w; }
|
2003-01-09 17:38:40 +00:00
|
|
|
|
2008-01-07 20:08:56 +00:00
|
|
|
FbTk::ThemeProxy<FbWinFrameTheme> &focusedWinFrameTheme() { return *m_focused_windowtheme.get(); }
|
|
|
|
const FbTk::ThemeProxy<FbWinFrameTheme> &focusedWinFrameTheme() const { return *m_focused_windowtheme.get(); }
|
|
|
|
FbTk::ThemeProxy<FbWinFrameTheme> &unfocusedWinFrameTheme() { return *m_unfocused_windowtheme.get(); }
|
|
|
|
const FbTk::ThemeProxy<FbWinFrameTheme> &unfocusedWinFrameTheme() const { return *m_unfocused_windowtheme.get(); }
|
|
|
|
|
2008-01-05 01:39:19 +00:00
|
|
|
FbTk::ThemeProxy<FbTk::MenuTheme> &menuTheme() { return *m_menutheme.get(); }
|
|
|
|
const FbTk::ThemeProxy<FbTk::MenuTheme> &menuTheme() const { return *m_menutheme.get(); }
|
|
|
|
const FbTk::ThemeProxy<RootTheme> &rootTheme() const { return *m_root_theme.get(); }
|
2008-01-08 08:50:58 +00:00
|
|
|
|
|
|
|
FbTk::ThemeProxy<WinButtonTheme> &focusedWinButtonTheme() { return *m_focused_winbutton_theme.get(); }
|
|
|
|
const FbTk::ThemeProxy<WinButtonTheme> &focusedWinButtonTheme() const { return *m_focused_winbutton_theme.get(); }
|
|
|
|
FbTk::ThemeProxy<WinButtonTheme> &unfocusedWinButtonTheme() { return *m_unfocused_winbutton_theme.get(); }
|
|
|
|
const FbTk::ThemeProxy<WinButtonTheme> &unfocusedWinButtonTheme() const { return *m_unfocused_winbutton_theme.get(); }
|
|
|
|
FbTk::ThemeProxy<WinButtonTheme> &pressedWinButtonTheme() { return *m_pressed_winbutton_theme.get(); }
|
|
|
|
const FbTk::ThemeProxy<WinButtonTheme> &pressedWinButtonTheme() const { return *m_pressed_winbutton_theme.get(); }
|
2003-07-20 08:12:36 +00:00
|
|
|
|
2005-07-20 18:29:01 +00:00
|
|
|
FbRootWindow &rootWindow() { return m_root_window; }
|
|
|
|
const FbRootWindow &rootWindow() const { return m_root_window; }
|
2003-01-07 02:03:57 +00:00
|
|
|
|
2007-10-13 21:51:37 +00:00
|
|
|
FbTk::FbWindow &dummyWindow() { return m_dummy_window; }
|
|
|
|
const FbTk::FbWindow &dummyWindow() const { return m_dummy_window; }
|
|
|
|
|
2005-07-20 18:29:01 +00:00
|
|
|
FbTk::MultLayers &layerManager() { return m_layermanager; }
|
|
|
|
const FbTk::MultLayers &layerManager() const { return m_layermanager; }
|
|
|
|
FbTk::ResourceManager &resourceManager() { return m_resource_manager; }
|
|
|
|
const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; }
|
|
|
|
const std::string &name() const { return m_name; }
|
|
|
|
const std::string &altName() const { return m_altname; }
|
|
|
|
bool isShuttingdown() const { return m_shutdown; }
|
2006-08-06 22:33:54 +00:00
|
|
|
bool isRestart();
|
2003-12-19 01:46:58 +00:00
|
|
|
|
2007-10-24 17:09:26 +00:00
|
|
|
ScreenPlacement &placementStrategy() { return *m_placement_strategy; }
|
|
|
|
const ScreenPlacement &placementStrategy() const { return *m_placement_strategy; }
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
int addWorkspace();
|
|
|
|
int removeLastWorkspace();
|
2003-07-01 12:39:09 +00:00
|
|
|
// scroll workspaces
|
2007-03-31 19:10:16 +00:00
|
|
|
/// go to next workspace ( right )
|
2005-07-20 18:29:01 +00:00
|
|
|
void nextWorkspace() { nextWorkspace(1); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// go to previous workspace
|
2005-07-20 18:29:01 +00:00
|
|
|
void prevWorkspace() { prevWorkspace(1); }
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Jump forward to a workspace
|
|
|
|
* @param delta number of steps to jump
|
|
|
|
*/
|
2002-12-13 20:16:17 +00:00
|
|
|
void nextWorkspace(int delta);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Jump backwards to a workspace
|
|
|
|
* @param delta number of steps to jump
|
|
|
|
*/
|
2002-12-13 20:16:17 +00:00
|
|
|
void prevWorkspace(int delta);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Jump right to a workspace.
|
|
|
|
* @param delta number of steps to jump
|
|
|
|
*/
|
2002-12-13 20:16:17 +00:00
|
|
|
void rightWorkspace(int delta);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Jump left to a workspace
|
|
|
|
* @param delta number of steps to jump
|
|
|
|
*/
|
2002-12-13 20:16:17 +00:00
|
|
|
void leftWorkspace(int delta);
|
2002-12-01 13:42:15 +00:00
|
|
|
|
2007-07-07 01:56:46 +00:00
|
|
|
/// update workspace name for given workspace
|
|
|
|
void updateWorkspaceName(unsigned int w);
|
2007-12-29 21:38:53 +00:00
|
|
|
/// remove all workspace names
|
2002-12-01 13:42:15 +00:00
|
|
|
void removeWorkspaceNames();
|
2007-03-31 19:10:16 +00:00
|
|
|
/// update the workspace name atom
|
2002-12-01 13:42:15 +00:00
|
|
|
void updateWorkspaceNamesAtom();
|
2007-03-31 19:10:16 +00:00
|
|
|
/// add a workspace name to the end of the workspace name list
|
2002-12-01 13:42:15 +00:00
|
|
|
void addWorkspaceName(const char *name);
|
2007-03-31 19:10:16 +00:00
|
|
|
/// add a window to the icon list
|
2002-12-01 13:42:15 +00:00
|
|
|
void addIcon(FluxboxWindow *win);
|
2007-03-31 19:10:16 +00:00
|
|
|
/// remove a window from the icon list
|
2002-12-01 13:42:15 +00:00
|
|
|
void removeIcon(FluxboxWindow *win);
|
2007-03-31 19:10:16 +00:00
|
|
|
/// remove a window
|
2002-12-01 13:42:15 +00:00
|
|
|
void removeWindow(FluxboxWindow *win);
|
2007-03-31 19:10:16 +00:00
|
|
|
/// remove a client
|
2003-04-15 00:50:25 +00:00
|
|
|
void removeClient(WinClient &client);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Gets name of a specific workspace
|
|
|
|
* @param workspace the workspace number to get the name of
|
|
|
|
* @return name of the workspace
|
|
|
|
*/
|
2002-12-01 13:42:15 +00:00
|
|
|
std::string getNameOfWorkspace(unsigned int workspace) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// changes workspace to specified id
|
2007-11-12 23:16:13 +00:00
|
|
|
void changeWorkspaceID(unsigned int, bool revert = true);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Sends a window to a workspace
|
|
|
|
* @param workspace the workspace id
|
|
|
|
* @param win the window to send
|
|
|
|
* @param changeworkspace whether current workspace should change
|
|
|
|
*/
|
2007-12-29 21:38:53 +00:00
|
|
|
void sendToWorkspace(unsigned int workspace, FluxboxWindow *win=0,
|
2003-04-25 11:02:57 +00:00
|
|
|
bool changeworkspace=true);
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Reassociate a window to another workspace
|
|
|
|
* @param window the window to reassociate
|
|
|
|
* @param workspace_id id of the workspace
|
|
|
|
* @param ignore_sticky ignores any sticky windows
|
|
|
|
*/
|
2007-12-29 21:38:53 +00:00
|
|
|
void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id,
|
2003-04-25 11:02:57 +00:00
|
|
|
bool ignore_sticky);
|
2003-04-15 00:50:25 +00:00
|
|
|
|
2003-12-19 00:34:23 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
void reconfigure();
|
|
|
|
void reconfigureTabs();
|
2002-12-01 13:42:15 +00:00
|
|
|
void rereadMenu();
|
|
|
|
void shutdown();
|
2003-06-12 15:22:59 +00:00
|
|
|
/// show position window centered on the screen with "X x Y" text
|
2002-12-01 13:42:15 +00:00
|
|
|
void showPosition(int x, int y);
|
2004-01-16 11:58:45 +00:00
|
|
|
void hidePosition();
|
2003-06-12 15:22:59 +00:00
|
|
|
/// show geomentry with "width x height"-text, not size of window
|
2006-07-20 11:16:09 +00:00
|
|
|
void showGeometry(int width, int height);
|
2002-12-01 13:42:15 +00:00
|
|
|
void hideGeometry();
|
2008-05-09 17:39:02 +00:00
|
|
|
|
|
|
|
/// @param text the text to be displayed in the tooltip window
|
2008-05-05 12:05:52 +00:00
|
|
|
void showTooltip(const std::string &text);
|
2008-05-09 17:39:02 +00:00
|
|
|
/// Hides the tooltip window
|
2008-05-05 12:05:52 +00:00
|
|
|
void hideTooltip();
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2008-05-09 17:39:02 +00:00
|
|
|
TooltipWindow& tooltipWindow() { return *m_tooltip_window; }
|
|
|
|
|
2003-02-02 16:32:41 +00:00
|
|
|
void setLayer(FbTk::XLayerItem &item, int layernum);
|
2003-02-09 14:11:14 +00:00
|
|
|
// remove? no, items are never removed from their layer until they die
|
2003-02-02 16:32:41 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
/// updates root window size and resizes/reconfigures screen clients
|
2003-06-25 05:47:23 +00:00
|
|
|
/// that depends on screen size (slit)
|
2003-05-12 04:28:46 +00:00
|
|
|
/// (and maximized windows?)
|
|
|
|
void updateSize();
|
|
|
|
|
2003-05-19 14:26:30 +00:00
|
|
|
// Xinerama-related functions
|
2007-03-31 19:10:16 +00:00
|
|
|
|
|
|
|
/// @return true if xinerama is available
|
2005-07-20 18:29:01 +00:00
|
|
|
bool hasXinerama() const { return m_xinerama_avail; }
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return umber of xinerama heads
|
2005-07-20 18:29:01 +00:00
|
|
|
int numHeads() const { return m_xinerama_num_heads; }
|
2003-05-19 14:26:30 +00:00
|
|
|
|
2003-05-19 15:32:47 +00:00
|
|
|
void initXinerama();
|
2007-03-01 22:18:18 +00:00
|
|
|
void clearHeads();
|
2008-02-10 17:16:50 +00:00
|
|
|
/// clean up xinerama
|
|
|
|
void clearXinerama();
|
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Determines head number for a position
|
|
|
|
* @param x position in pixels on the screen
|
|
|
|
* @param y position in pixels on the screen
|
|
|
|
* @return head number at this position
|
|
|
|
*/
|
2003-05-19 14:26:30 +00:00
|
|
|
int getHead(int x, int y) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return head number of window
|
|
|
|
int getHead(const FbTk::FbWindow &win) const;
|
|
|
|
/// @return the current head number
|
2003-05-19 14:26:30 +00:00
|
|
|
int getCurrHead() const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return head x position
|
2003-05-19 14:26:30 +00:00
|
|
|
int getHeadX(int head) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return head y position
|
2003-05-19 14:26:30 +00:00
|
|
|
int getHeadY(int head) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return width of the head
|
2003-05-19 14:26:30 +00:00
|
|
|
int getHeadWidth(int head) const;
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return height of the head
|
2003-05-19 14:26:30 +00:00
|
|
|
int getHeadHeight(int head) const;
|
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
/// @return the new (x,y) for a rectangle fitted on a head
|
2004-09-11 13:33:07 +00:00
|
|
|
std::pair<int,int> clampToHead(int head, int x, int y, int w, int h) const;
|
|
|
|
|
2003-05-19 15:32:47 +00:00
|
|
|
// magic to allow us to have "on head" placement (menu) without
|
2003-05-19 14:26:30 +00:00
|
|
|
// the object really knowing about it.
|
|
|
|
template <typename OnHeadObject>
|
2007-03-31 19:10:16 +00:00
|
|
|
int getOnHead(OnHeadObject &obj) const;
|
2003-05-19 14:26:30 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
// grouping - we want ordering, so we can either search for a
|
2003-06-23 14:16:05 +00:00
|
|
|
// group to the left, or to the right (they'll be different if
|
|
|
|
// they exist).
|
2006-07-20 03:25:28 +00:00
|
|
|
WinClient *findGroupLeft(WinClient &winclient);
|
|
|
|
WinClient *findGroupRight(WinClient &winclient);
|
2003-06-23 14:16:05 +00:00
|
|
|
|
2003-01-05 22:24:55 +00:00
|
|
|
/// create window frame for client window and attach it
|
|
|
|
FluxboxWindow *createWindow(Window clientwin);
|
2007-03-31 19:10:16 +00:00
|
|
|
/// creates a window frame for a winclient. The client is attached to the window
|
2003-04-14 12:13:36 +00:00
|
|
|
FluxboxWindow *createWindow(WinClient &client);
|
2003-06-18 13:42:21 +00:00
|
|
|
/// request workspace space, i.e "don't maximize over this area"
|
2004-09-11 13:33:07 +00:00
|
|
|
Strut *requestStrut(int head, int left, int right, int top, int bottom);
|
2003-06-18 13:42:21 +00:00
|
|
|
/// remove requested space and destroy strut
|
2007-12-29 21:38:53 +00:00
|
|
|
void clearStrut(Strut *strut);
|
2003-06-18 13:42:21 +00:00
|
|
|
/// updates max avaible area for the workspace
|
|
|
|
void updateAvailableWorkspaceArea();
|
2002-12-01 13:42:15 +00:00
|
|
|
|
2003-07-20 02:45:57 +00:00
|
|
|
// for extras to add menus. These menus must be marked
|
2003-07-20 08:12:36 +00:00
|
|
|
// internal for their safety, and __the extension__ must
|
|
|
|
// delete and remove the menu itself (opposite to Window)
|
2006-05-20 15:08:14 +00:00
|
|
|
void addConfigMenu(const FbTk::FbString &label, FbTk::Menu &menu);
|
2003-07-20 02:45:57 +00:00
|
|
|
void removeConfigMenu(FbTk::Menu &menu);
|
|
|
|
|
2003-12-19 01:46:58 +00:00
|
|
|
|
2006-03-18 21:59:44 +00:00
|
|
|
/// Adds a resource to managed resource list
|
|
|
|
/// This resource is now owned by Screen and will be destroyed
|
|
|
|
/// when screen dies
|
|
|
|
void addManagedResource(FbTk::Resource_base *resource);
|
2003-09-08 16:37:27 +00:00
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
/**
|
|
|
|
* Used to emit different signals for the screen
|
|
|
|
*/
|
2002-12-01 13:42:15 +00:00
|
|
|
class ScreenSubject:public FbTk::Subject {
|
|
|
|
public:
|
|
|
|
ScreenSubject(BScreen &scr):m_scr(scr) { }
|
|
|
|
const BScreen &screen() const { return m_scr; }
|
|
|
|
BScreen &screen() { return m_scr; }
|
|
|
|
private:
|
|
|
|
BScreen &m_scr;
|
|
|
|
};
|
2003-09-08 16:37:27 +00:00
|
|
|
|
2001-12-11 20:47:02 +00:00
|
|
|
private:
|
2003-01-12 17:59:20 +00:00
|
|
|
void setupConfigmenu(FbTk::Menu &menu);
|
2002-12-01 13:42:15 +00:00
|
|
|
void initMenu();
|
2003-06-12 15:22:59 +00:00
|
|
|
void renderGeomWindow();
|
2004-01-16 11:58:45 +00:00
|
|
|
void renderPosWindow();
|
2003-06-12 15:22:59 +00:00
|
|
|
|
2004-09-11 13:33:07 +00:00
|
|
|
const Strut* availableWorkspaceArea(int head) const;
|
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
ScreenSubject
|
2002-12-01 13:42:15 +00:00
|
|
|
m_clientlist_sig, ///< client signal
|
2003-09-08 16:37:27 +00:00
|
|
|
m_iconlist_sig, ///< notify if a window gets iconified/deiconified
|
2002-12-01 13:42:15 +00:00
|
|
|
m_workspacecount_sig, ///< workspace count signal
|
2007-12-29 21:38:53 +00:00
|
|
|
m_workspacenames_sig, ///< workspace names signal
|
2004-01-19 18:29:43 +00:00
|
|
|
m_workspace_area_sig, ///< workspace area changed signal
|
2003-07-01 12:39:09 +00:00
|
|
|
m_currentworkspace_sig, ///< current workspace signal
|
2007-11-12 21:59:43 +00:00
|
|
|
m_focusedwindow_sig, ///< focused window signal
|
2003-08-24 13:07:01 +00:00
|
|
|
m_reconfigure_sig, ///< reconfigure signal
|
2007-07-03 18:50:53 +00:00
|
|
|
m_resize_sig, ///< resize signal
|
|
|
|
m_bg_change_sig; ///< background change signal
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2003-02-03 13:50:35 +00:00
|
|
|
FbTk::MultLayers m_layermanager;
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2008-01-19 12:00:46 +00:00
|
|
|
bool root_colormap_installed, managed;
|
2006-02-18 11:39:38 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
GC opGC;
|
2004-09-16 10:10:37 +00:00
|
|
|
|
2001-12-11 20:47:02 +00:00
|
|
|
|
2003-05-15 23:30:07 +00:00
|
|
|
std::auto_ptr<FbTk::ImageControl> m_image_control;
|
2005-06-23 03:07:25 +00:00
|
|
|
std::auto_ptr<FbTk::Menu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu;
|
|
|
|
|
|
|
|
ExtraMenus m_extramenus;
|
2001-12-11 20:47:02 +00:00
|
|
|
|
2006-05-20 15:08:14 +00:00
|
|
|
typedef std::list<std::pair<FbTk::FbString, FbTk::Menu *> > Configmenus;
|
2003-07-20 02:45:57 +00:00
|
|
|
|
2002-02-08 13:35:20 +00:00
|
|
|
|
2003-07-20 02:45:57 +00:00
|
|
|
Configmenus m_configmenu_list;
|
2003-05-19 22:45:51 +00:00
|
|
|
Icons m_icon_list;
|
2003-04-15 00:50:25 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
std::auto_ptr<Slit> m_slit;
|
2008-01-12 06:36:38 +00:00
|
|
|
std::auto_ptr<Toolbar> m_toolbar;
|
2003-03-03 21:51:13 +00:00
|
|
|
|
2003-05-19 22:45:51 +00:00
|
|
|
Workspace *m_current_workspace;
|
2001-12-11 20:47:02 +00:00
|
|
|
|
2003-05-19 22:45:51 +00:00
|
|
|
WorkspaceNames m_workspace_names;
|
|
|
|
Workspaces m_workspaces_list;
|
2002-08-02 12:58:37 +00:00
|
|
|
|
2008-01-07 20:08:56 +00:00
|
|
|
std::auto_ptr<FbWinFrameTheme> m_focused_windowtheme,
|
|
|
|
m_unfocused_windowtheme;
|
2008-01-08 08:50:58 +00:00
|
|
|
std::auto_ptr<WinButtonTheme> m_focused_winbutton_theme,
|
|
|
|
m_unfocused_winbutton_theme, m_pressed_winbutton_theme;
|
2007-12-28 07:16:17 +00:00
|
|
|
std::auto_ptr<FbTk::MenuTheme> m_menutheme;
|
2003-04-28 22:43:26 +00:00
|
|
|
std::auto_ptr<RootTheme> m_root_theme;
|
2003-01-07 02:03:57 +00:00
|
|
|
|
2003-05-10 22:45:08 +00:00
|
|
|
FbRootWindow m_root_window;
|
2008-05-09 17:39:02 +00:00
|
|
|
std::auto_ptr<OSDWindow> m_geom_window, m_pos_window;
|
|
|
|
std::auto_ptr<TooltipWindow> m_tooltip_window;
|
2008-01-19 12:00:46 +00:00
|
|
|
FbTk::FbWindow m_dummy_window;
|
2003-05-10 22:45:08 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
struct ScreenResource {
|
2003-05-18 22:04:06 +00:00
|
|
|
ScreenResource(FbTk::ResourceManager &rm, const std::string &scrname,
|
2002-12-01 13:42:15 +00:00
|
|
|
const std::string &altscrname);
|
2001-12-11 20:47:02 +00:00
|
|
|
|
2003-06-23 12:57:36 +00:00
|
|
|
FbTk::Resource<bool> image_dither, opaque_move, full_max,
|
2007-10-13 21:51:37 +00:00
|
|
|
max_ignore_inc, max_disable_move, max_disable_resize,
|
|
|
|
workspace_warping, show_window_pos, auto_raise, click_raises,
|
|
|
|
decorate_transient;
|
2007-03-06 17:20:13 +00:00
|
|
|
FbTk::Resource<std::string> default_deco;
|
2007-01-04 19:13:55 +00:00
|
|
|
FbTk::Resource<std::string> rootcommand;
|
2006-03-22 12:23:17 +00:00
|
|
|
FbTk::Resource<FbWinFrame::TabPlacement> tab_placement;
|
2004-05-02 21:12:22 +00:00
|
|
|
FbTk::Resource<std::string> windowmenufile;
|
2007-10-13 21:51:37 +00:00
|
|
|
FbTk::Resource<unsigned int> typing_delay;
|
2006-08-02 22:02:31 +00:00
|
|
|
FbTk::Resource<FollowModel> follow_model, user_follow_model;
|
2003-02-22 16:09:44 +00:00
|
|
|
bool ordered_dither;
|
2004-09-12 14:56:20 +00:00
|
|
|
FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,
|
2008-05-05 12:05:52 +00:00
|
|
|
unfocused_alpha, menu_alpha, menu_delay, menu_delay_close,
|
|
|
|
tab_width, tooltip_delay;
|
2003-12-12 18:18:49 +00:00
|
|
|
FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode;
|
2006-02-19 11:11:22 +00:00
|
|
|
|
2004-03-22 21:01:42 +00:00
|
|
|
FbTk::Resource<int> gc_line_width;
|
|
|
|
FbTk::Resource<FbTk::GContext::LineStyle> gc_line_style;
|
|
|
|
FbTk::Resource<FbTk::GContext::JoinStyle> gc_join_style;
|
|
|
|
FbTk::Resource<FbTk::GContext::CapStyle> gc_cap_style;
|
2005-09-07 16:46:17 +00:00
|
|
|
FbTk::Resource<std::string> scroll_action;
|
|
|
|
FbTk::Resource<bool> scroll_reverse;
|
2007-07-03 22:56:46 +00:00
|
|
|
FbTk::Resource<bool> allow_remote_actions;
|
2007-10-13 21:51:37 +00:00
|
|
|
FbTk::Resource<bool> clientmenu_use_pixmap;
|
|
|
|
FbTk::Resource<bool> tabs_use_pixmap;
|
2006-07-26 01:22:42 +00:00
|
|
|
FbTk::Resource<bool> max_over_tabs;
|
2006-03-22 12:23:17 +00:00
|
|
|
FbTk::Resource<bool> default_internal_tabs;
|
2001-12-11 20:47:02 +00:00
|
|
|
|
2007-03-31 19:10:16 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
} resource;
|
2003-02-03 13:50:35 +00:00
|
|
|
|
2006-03-18 21:59:44 +00:00
|
|
|
/// Holds manage resources that screen destroys
|
|
|
|
FbTk::ResourceManager::ResourceList m_managed_resources;
|
|
|
|
|
2006-02-18 11:39:38 +00:00
|
|
|
FbTk::ResourceManager &m_resource_manager;
|
|
|
|
const std::string m_name, m_altname;
|
|
|
|
|
|
|
|
FocusControl *m_focus_control;
|
2007-10-24 17:09:26 +00:00
|
|
|
ScreenPlacement *m_placement_strategy;
|
2006-02-18 11:39:38 +00:00
|
|
|
|
2003-06-23 14:16:05 +00:00
|
|
|
// This is a map of windows to clients for clients that had a left
|
|
|
|
// window set, but that window wasn't present at the time
|
|
|
|
typedef std::map<Window, WinClient *> Groupables;
|
|
|
|
Groupables m_expecting_groups;
|
|
|
|
|
2007-10-24 17:09:26 +00:00
|
|
|
bool m_cycling;
|
2007-03-31 19:10:16 +00:00
|
|
|
const ClientPattern *m_cycle_opts;
|
2007-03-04 17:47:37 +00:00
|
|
|
|
2005-01-03 05:00:39 +00:00
|
|
|
// Xinerama related private data
|
2003-05-19 14:26:30 +00:00
|
|
|
bool m_xinerama_avail;
|
|
|
|
int m_xinerama_num_heads;
|
|
|
|
int m_xinerama_center_x, m_xinerama_center_y;
|
|
|
|
|
2007-07-11 11:54:53 +00:00
|
|
|
std::vector<HeadArea *> m_head_areas;
|
2003-06-18 13:42:21 +00:00
|
|
|
|
2003-05-19 14:26:30 +00:00
|
|
|
struct XineramaHeadInfo {
|
2007-12-29 21:38:53 +00:00
|
|
|
int x, y, width, height;
|
2003-05-19 14:26:30 +00:00
|
|
|
} *m_xinerama_headinfo;
|
2003-05-19 22:45:51 +00:00
|
|
|
|
2006-08-06 22:33:54 +00:00
|
|
|
bool m_restart, m_shutdown;
|
2001-12-11 20:47:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-02-03 13:50:35 +00:00
|
|
|
#endif // SCREEN_HH
|