FluxboxWindow Class ReferenceCreates the window frame and handles any window event for it.
More...
#include <Window.hh>
Inheritance diagram for FluxboxWindow:
List of all members.
|
accessors |
typedef std::list< std::pair<
const char *, FbTk::Menu * > > | ExtraMenus |
|
bool | isManaged () const |
|
bool | isFocused () const |
|
bool | isVisible () const |
|
bool | isIconic () const |
|
bool | isShaded () const |
|
bool | isMaximized () const |
|
bool | isIconifiable () const |
|
bool | isMaximizable () const |
|
bool | isResizable () const |
|
bool | isClosable () const |
|
bool | isStuck () const |
|
bool | hasTitlebar () const |
|
bool | isMoving () const |
|
bool | isResizing () const |
|
bool | isGroupable () const |
|
int | numClients () const |
|
ClientList & | clientList () |
|
const ClientList & | clientList () const |
|
WinClient & | winClient () |
|
const WinClient & | winClient () const |
|
const BScreen & | screen () const |
|
BScreen & | screen () |
|
const FbTk::XLayerItem & | layerItem () const |
|
FbTk::XLayerItem & | layerItem () |
|
Window | clientWindow () const |
|
FbTk::FbWindow & | fbWindow () |
|
const FbTk::FbWindow & | fbWindow () const |
|
FbTk::Menu & | menu () |
|
const FbTk::Menu & | menu () const |
|
void | addExtraMenu (const char *label, FbTk::Menu *menu) |
|
void | removeExtraMenu (FbTk::Menu *menu) |
|
ExtraMenus & | extraMenus () |
|
const ExtraMenus & | extraMenus () const |
|
const FbTk::FbWindow & | parent () const |
|
FbTk::FbWindow & | parent () |
|
const std::string & | title () const |
|
const std::string & | iconTitle () const |
|
int | x () const |
|
int | y () const |
|
unsigned int | width () const |
|
unsigned int | height () const |
|
unsigned int | workspaceNumber () const |
|
int | layerNum () const |
|
void | setLayerNum (int layernum) |
|
unsigned int | titlebarHeight () const |
| bool | isLowerTab () const |
|
int | initialState () const |
|
FbWinFrame & | frame () |
|
const FbWinFrame & | frame () const |
Public Types |
|
typedef FluxboxWindow::_blackbox_hints | BlackboxHints |
|
typedef FluxboxWindow::_blackbox_attributes | BlackboxAttributes |
|
typedef std::list< WinClient * > | ClientList |
| enum | Decoration { DECOR_NONE = 0,
DECOR_NORMAL,
DECOR_TINY,
DECOR_TOOL
} |
| | Represents certain "preset" sets of decorations. More...
|
| enum | { MwmHintsFunctions = (1l << 0),
MwmHintsDecorations = (1l << 1)
} |
| | Motif wm Hints. More...
|
| enum | MwmFunc {
MwmFuncAll = (1l << 0),
MwmFuncResize = (1l << 1),
MwmFuncMove = (1l << 2),
MwmFuncIconify = (1l << 3),
MwmFuncMaximize = (1l << 4),
MwmFuncClose = (1l << 5)
} |
| | Motif wm functions. More...
|
| enum | MwmDecor {
MwmDecorAll = (1l << 0),
MwmDecorBorder = (1l << 1),
MwmDecorHandle = (1l << 2),
MwmDecorTitle = (1l << 3),
MwmDecorMenu = (1l << 4),
MwmDecorIconify = (1l << 5),
MwmDecorMaximize = (1l << 6)
} |
| | Motif wm decorations. More...
|
| enum | Attrib {
ATTRIB_SHADED = 0x01,
ATTRIB_MAXHORIZ = 0x02,
ATTRIB_MAXVERT = 0x04,
ATTRIB_OMNIPRESENT = 0x08,
ATTRIB_WORKSPACE = 0x10,
ATTRIB_STACK = 0x20,
ATTRIB_DECORATION = 0x40
} |
| | attributes for BlackboxHints
|
| enum | MaximizeMode { MAX_NONE = 0,
MAX_HORZ = 1,
MAX_VERT = 2,
MAX_FULL = 3
} |
| enum | DecorationMask {
DECORM_TITLEBAR = (1<<0),
DECORM_HANDLE = (1<<1),
DECORM_BORDER = (1<<2),
DECORM_ICONIFY = (1<<3),
DECORM_MAXIMIZE = (1<<4),
DECORM_CLOSE = (1<<5),
DECORM_MENU = (1<<6),
DECORM_STICKY = (1<<7),
DECORM_SHADE = (1<<8),
DECORM_TAB = (1<<9),
DECORM_ENABLED = (1<<10),
DECORM_LAST = (1<<11)
} |
| enum | ResizeCorner { LEFTTOP,
LEFTBOTTOM,
RIGHTBOTTOM,
RIGHTTOP
} |
Public Member Functions |
|
| FluxboxWindow (WinClient &client, FbWinFrameTheme &tm, FbTk::XLayer &layer) |
| | create a window from a client
|
| void | attachClient (WinClient &client) |
| | attach client to our client list and remove it from old window
|
|
bool | detachClient (WinClient &client) |
| | detach client (remove it from list) and create a new window for it
|
|
void | detachCurrentClient () |
| | detach current working client if we have more than one
|
|
bool | removeClient (WinClient &client) |
| | remove client from client list
|
|
bool | setCurrentClient (WinClient &client, bool setinput=true) |
| | set new current client and raise it
|
|
WinClient * | findClient (Window win) |
| | returns WinClient of window we're searching for
|
|
void | nextClient () |
| | raise and focus next client
|
|
void | prevClient () |
|
void | moveClientLeft () |
|
void | moveClientRight () |
|
bool | setInputFocus () |
|
void | raiseAndFocus () |
|
void | setFocusFlag (bool flag) |
|
void | show () |
|
void | hide () |
| void | iconify () |
|
void | deiconify (bool reassoc=true, bool do_raise=true) |
|
void | close () |
| | close current client
|
| void | withdraw () |
| | set the window in withdrawn state
|
| void | maximize (int type=MAX_FULL) |
| | toggle maximize
|
| void | maximizeHorizontal () |
| | maximizes the window horizontal
|
| void | maximizeVertical () |
| | maximizes the window vertical
|
| void | maximizeFull () |
| | maximizes the window fully
|
|
void | shade () |
| | toggles shade
|
|
void | stick () |
| | toggles sticky
|
|
void | raise () |
|
void | lower () |
|
void | tempRaise () |
|
void | raiseLayer () |
|
void | lowerLayer () |
|
void | moveToLayer (int layernum) |
|
void | reconfigure () |
| void | installColormap (bool) |
|
void | restore (WinClient *client, bool remap) |
|
void | restore (bool remap) |
|
void | move (int x, int y, int gravity=ForgetGravity) |
| | move frame to x, y
|
|
void | resize (unsigned int width, unsigned int height) |
| | resize frame to width, height
|
|
void | moveResize (int x, int y, unsigned int width, unsigned int height, int gravity=ForgetGravity) |
| | move and resize frame to pox x,y and size width, height
|
|
void | setWorkspace (int n) |
|
void | changeBlackboxHints (const BlackboxHints &bh) |
|
void | updateFunctions () |
| void | restoreAttributes () |
| void | showMenu (int mx, int my) |
| void | popupMenu () |
|
void | pauseMoving () |
|
void | resumeMoving () |
|
void | setDecoration (Decoration decoration) |
|
void | applyDecorations (bool initial=false) |
|
void | toggleDecoration () |
|
unsigned int | decorationMask () const |
|
void | setDecorationMask (unsigned int mask) |
|
const timeval & | lastFocusTime () const |
|
| void | handleEvent (XEvent &event) |
|
void | buttonPressEvent (XButtonEvent &be) |
|
void | buttonReleaseEvent (XButtonEvent &be) |
|
void | motionNotifyEvent (XMotionEvent &me) |
| void | destroyNotifyEvent (XDestroyWindowEvent &dwe) |
|
void | mapRequestEvent (XMapRequestEvent &mre) |
|
void | mapNotifyEvent (XMapEvent &mapev) |
| void | unmapNotifyEvent (XUnmapEvent &unmapev) |
|
void | exposeEvent (XExposeEvent &ee) |
|
void | configureRequestEvent (XConfigureRequestEvent &ce) |
|
void | propertyNotifyEvent (WinClient &client, Atom a) |
|
void | enterNotifyEvent (XCrossingEvent &ev) |
|
void | leaveNotifyEvent (XCrossingEvent &ev) |
|
|
FbTk::Subject & | stateSig () |
|
const FbTk::Subject & | stateSig () const |
|
FbTk::Subject & | layerSig () |
|
const FbTk::Subject & | layerSig () const |
|
FbTk::Subject & | hintSig () |
|
const FbTk::Subject & | hintSig () const |
|
FbTk::Subject & | workspaceSig () |
|
const FbTk::Subject & | workspaceSig () const |
|
FbTk::Subject & | dieSig () |
|
const FbTk::Subject & | dieSig () const |
|
FbTk::Subject & | focusSig () |
|
FbTk::Subject & | titleSig () |
Public Attributes |
|
bool | oplock |
| | Used to help stop transient loops occurring by locking a window during certain operations.
|
Friends |
|
class | WinClient |
Detailed Description
Creates the window frame and handles any window event for it.
Definition at line 58 of file Window.hh.
Member Enumeration Documentation
|
|
Motif wm Hints.
- Enumeration values:
-
| MwmHintsFunctions |
use motif wm functions |
| MwmHintsDecorations |
use motif wm decorations |
Definition at line 69 of file Window.hh.
|
|
|
Represents certain "preset" sets of decorations.
- Enumeration values:
-
| DECOR_NONE |
no decor at all |
| DECOR_NORMAL |
normal normal |
| DECOR_TINY |
tiny decoration |
| DECOR_TOOL |
decor tool |
Definition at line 61 of file Window.hh.
|
|
|
This enumeration represents individual decoration attributes, they can be OR-d together to get a mask. Useful for saving.
Definition at line 120 of file Window.hh.
00120 {
00121 DECORM_TITLEBAR = (1<<0),
00122 DECORM_HANDLE = (1<<1),
00123 DECORM_BORDER = (1<<2),
00124 DECORM_ICONIFY = (1<<3),
00125 DECORM_MAXIMIZE = (1<<4),
00126 DECORM_CLOSE = (1<<5),
00127 DECORM_MENU = (1<<6),
00128 DECORM_STICKY = (1<<7),
00129 DECORM_SHADE = (1<<8),
00130 DECORM_TAB = (1<<9),
00131 DECORM_ENABLED = (1<<10),
00132 DECORM_LAST = (1<<11)
00133 };
|
|
|
Types of maximization - Enumeration values:
-
| MAX_NONE |
normal state |
| MAX_HORZ |
maximize horizontal |
| MAX_VERT |
maximize vertical |
| MAX_FULL |
maximize full |
Definition at line 109 of file Window.hh.
|
|
|
Motif wm decorations.
- Enumeration values:
-
| MwmDecorBorder |
all decorations |
| MwmDecorHandle |
border |
| MwmDecorTitle |
handle |
| MwmDecorMenu |
title |
| MwmDecorIconify |
menu |
| MwmDecorMaximize |
iconify |
Definition at line 85 of file Window.hh.
|
|
|
Motif wm functions.
- Enumeration values:
-
| MwmFuncAll |
all motif wm functions |
| MwmFuncResize |
resize |
| MwmFuncMove |
move |
| MwmFuncIconify |
iconify |
| MwmFuncMaximize |
maximize |
| MwmFuncClose |
close |
Definition at line 75 of file Window.hh.
|
Member Function Documentation
| void FluxboxWindow::attachClient |
( |
WinClient & |
client |
) |
|
|
|
|
attach client to our client list and remove it from old window
! TODO: check for isGroupable in client
Definition at line 590 of file Window.cc.
References FbTk::EventManager::add(), FbWinFrame::addLabelButton(), clientList(), WinClient::fbwindow(), m_client, m_clientlist, WinClient::m_win, FbTk::FbWindow::raise(), FbWinFrame::reconfigure(), WinClient::saveBlackboxAttribs(), FbWinFrame::setClientWindow(), WinClient::setGroupLeftWindow(), FbTk::TextButton::setJustify(), and WinClient::title().
Referenced by BScreen::createWindow().
00590 {
00592 if (client.m_win == this)
00593 return;
00594
00595
00596 frame().setClientWindow(client);
00597 FbTk::EventManager &evm = *FbTk::EventManager::instance();
00598
00599
00600 Window leftwin = None;
00601 if (!clientList().empty())
00602 leftwin = clientList().back()->window();
00603
00604 client.setGroupLeftWindow(leftwin);
00605
00606 if (client.fbwindow() != 0) {
00607 FluxboxWindow *old_win = client.fbwindow();
00608
00609
00610 ClientList::iterator client_it = old_win->clientList().begin();
00611 ClientList::iterator client_it_end = old_win->clientList().end();
00612 for (; client_it != client_it_end; ++client_it) {
00613
00614 evm.add(*this, (*client_it)->window());
00615
00616
00617 frame().setClientWindow(**client_it);
00618 moveResizeClient(**client_it,
00619 frame().clientArea().x(),
00620 frame().clientArea().y(),
00621 frame().clientArea().width(),
00622 frame().clientArea().height());
00623
00624 (*client_it)->m_win = this;
00625
00626
00627 FbTk::TextButton *btn = new FbTk::TextButton(frame().label(),
00628 frame().theme().font(),
00629 (*client_it)->title());
00630 btn->setJustify(frame().theme().justify());
00631 m_labelbuttons[(*client_it)] = btn;
00632 frame().addLabelButton(*btn);
00633 btn->show();
00634
00635 btn->setEventMask(ExposureMask | ButtonPressMask |
00636 ButtonReleaseMask | ButtonMotionMask |
00637 EnterWindowMask);
00638
00639
00640 FbTk::RefCount<FbTk::Command>
00641 set_client_cmd(new SetClientCmd(*(*client_it)));
00642 btn->setOnClick(set_client_cmd);
00643 evm.add(*this, btn->window());
00644
00645 (*client_it)->saveBlackboxAttribs(m_blackbox_attrib);
00646 }
00647
00648
00649
00650
00651 m_clientlist.splice(m_clientlist.end(), old_win->m_clientlist);
00652 old_win->m_client = 0;
00653
00654 delete old_win;
00655
00656 } else {
00657
00658 FbTk::TextButton *btn = new FbTk::TextButton(frame().label(),
00659 frame().theme().font(),
00660 client.title());
00661 m_labelbuttons[&client] = btn;
00662 frame().addLabelButton(*btn);
00663 btn->show();
00664 FbTk::EventManager &evm = *FbTk::EventManager::instance();
00665
00666 btn->setEventMask(ExposureMask | ButtonPressMask |
00667 ButtonReleaseMask | ButtonMotionMask |
00668 EnterWindowMask);
00669
00670
00671 FbTk::RefCount<FbTk::Command> set_client_cmd(new SetClientCmd(client));
00672 btn->setOnClick(set_client_cmd);
00673 evm.add(*this, btn->window());
00674
00675 client.m_win = this;
00676
00677 client.saveBlackboxAttribs(m_blackbox_attrib);
00678 m_clientlist.push_back(&client);
00679 }
00680
00681
00682
00683
00684 m_statesig.notify();
00685 m_workspacesig.notify();
00686 m_layersig.notify();
00687
00688 frame().reconfigure();
00689
00690
00691 m_client->raise();
00692 }
|
| void FluxboxWindow::destroyNotifyEvent |
( |
XDestroyWindowEvent & |
de |
) |
|
|
|
|
Checks if event is for m_client->window. If it isn't, we leave it until the window is unmapped, if it is, we just hide it for now.
Definition at line 2123 of file Window.cc.
References FbWinFrame::hide(), and FbTk::FbWindow::window().
02123 {
02124 if (de.window == m_client->window()) {
02125 #ifdef DEBUG
02126 cerr<<__FILE__<<"("<<__LINE__<<"): DestroyNotifyEvent this="<<this<<endl;
02127 #endif // DEBUG
02128 if (numClients() == 1)
02129 frame().hide();
02130 }
02131
02132 }
|
| void FluxboxWindow::handleEvent |
( |
XEvent & |
event |
) |
[virtual] |
|
|
|
Redirect any unhandled event to our handlers
Reimplemented from FbTk::EventHandler.
Definition at line 1958 of file Window.cc.
References findClient(), Fluxbox::haveShape(), FbTk::App::instance(), Fluxbox::instance(), and Fluxbox::shapeEventbase().
01958 {
01959 switch (event.type) {
01960 case ConfigureRequest:
01961 configureRequestEvent(event.xconfigurerequest);
01962 break;
01963 case MapNotify:
01964 mapNotifyEvent(event.xmap);
01965 break;
01966
01967
01968
01969
01970 case PropertyNotify: {
01971 WinClient *client = findClient(event.xproperty.window);
01972 if (client) {
01973 propertyNotifyEvent(*client, event.xproperty.atom);
01974 }
01975 }
01976 break;
01977
01978 default:
01979 #ifdef SHAPE
01980 if (Fluxbox::instance()->haveShape() &&
01981 event.type == Fluxbox::instance()->shapeEventbase() + ShapeNotify) {
01982 XShapeEvent *shape_event = (XShapeEvent *)&event;
01983
01984 if (shape_event->kind != ShapeBounding)
01985 break;
01986
01987 if (shape_event->shaped) {
01988 m_shaped = true;
01989 shape();
01990 } else {
01991 m_shaped = false;
01992
01993 XShapeCombineMask(display,
01994 frame().window().window(), ShapeBounding,
01995 0, 0,
01996 None, ShapeSet);
01997 }
01998
01999 FbTk::App::instance()->sync(false);
02000 break;
02001 }
02002 #endif // SHAPE
02003
02004 break;
02005 }
02006 }
|
| void FluxboxWindow::iconify |
( |
|
) |
|
|
|
|
Unmaps the window and removes it from workspace list
Definition at line 1246 of file Window.cc.
References WinClient::fbwindow(), Fluxbox::getFocusedWindow(), FbTk::FbWindow::hide(), FbWinFrame::hide(), FbTk::Menu::hide(), Fluxbox::instance(), isIconic(), Fluxbox::revertFocus(), FbTk::FbWindow::setEventMask(), WinClient::transientFor(), and WinClient::transientList().
01246 {
01247 if (isIconic())
01248 return;
01249
01250 menu().hide();
01251 iconic = true;
01252
01253 setState(IconicState);
01254
01255 frame().hide();
01256
01257 ClientList::iterator client_it = m_clientlist.begin();
01258 const ClientList::iterator client_it_end = m_clientlist.end();
01259 for (; client_it != client_it_end; ++client_it) {
01260 WinClient &client = *(*client_it);
01261 client.setEventMask(NoEventMask);
01262 client.hide();
01263 client.setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
01264 if (client.transientFor() &&
01265 client.transientFor()->fbwindow()) {
01266 if (!client.transientFor()->fbwindow()->isIconic()) {
01267 client.transientFor()->fbwindow()->iconify();
01268 }
01269 }
01270
01271 if (!client.transientList().empty()) {
01272 WinClient::TransientList::iterator it = client.transientList().begin();
01273 WinClient::TransientList::iterator it_end = client.transientList().end();
01274 for (; it != it_end; it++)
01275 if ((*it)->fbwindow())
01276 (*it)->fbwindow()->iconify();
01277 }
01278 }
01279
01280 WinClient *focused_client = Fluxbox::instance()->getFocusedWindow();
01281 if (focused_client && focused_client->fbwindow() == this)
01282 Fluxbox::instance()->revertFocus(screen());
01283
01284 }
|
| void FluxboxWindow::installColormap |
( |
bool |
install |
) |
|
|
|
|
!
Definition at line 1718 of file Window.cc.
References WinClient::getAttrib(), Fluxbox::grab(), Fluxbox::instance(), Fluxbox::ungrab(), WinClient::validateClient(), and FbTk::FbWindow::window().
01718 {
01719 if (m_client == 0) return;
01720
01721 Fluxbox *fluxbox = Fluxbox::instance();
01722 fluxbox->grab();
01723 if (! m_client->validateClient())
01724 return;
01725
01726 int i = 0, ncmap = 0;
01727 Colormap *cmaps = XListInstalledColormaps(display, m_client->window(), &ncmap);
01728 XWindowAttributes wattrib;
01729 if (cmaps) {
01730 if (m_client->getAttrib(wattrib)) {
01731 if (install) {
01732
01733 for (i = 0; i < ncmap; i++) {
01734 if (*(cmaps + i) == wattrib.colormap) {
01735
01736 install = false;
01737 break;
01738 }
01739 }
01740
01741 if (install)
01742 XInstallColormap(display, wattrib.colormap);
01743 } else {
01744 for (i = 0; i < ncmap; i++) {
01745 if (*(cmaps + i) == wattrib.colormap)
01746 XUninstallColormap(display, wattrib.colormap);
01747 }
01748 }
01749 }
01750
01751 XFree(cmaps);
01752 }
01753
01754 fluxbox->ungrab();
01755 }
|
| bool FluxboxWindow::isLowerTab |
( |
|
) |
const |
|
|
|
Determine if this is the lowest tab of them all
Definition at line 1950 of file Window.cc.
01950 {
01951 cerr<<__FILE__<<"("<<__FUNCTION__<<") TODO!"<<endl;
01952 return true;
01953 }
|
| void FluxboxWindow::maximize |
( |
int |
type = MAX_FULL |
) |
|
|
|
|
toggle maximize
Maximize window both horizontal and vertical
Definition at line 1357 of file Window.cc.
References MAX_FULL, MAX_HORZ, MAX_NONE, MAX_VERT, moveResize(), and FbWinFrame::x().
Referenced by maximizeFull(), maximizeHorizontal(), and maximizeVertical().
01357 {
01358 if (isIconic())
01359 deiconify();
01360
01361 int head = screen().getHead(frame().window());
01362 int new_x = frame().x(),
01363 new_y = frame().y(),
01364 new_w = frame().width(),
01365 new_h = frame().height();
01366
01367 int orig_max = maximized;
01368
01369
01370
01371
01372
01373
01374
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384
01385
01386
01387
01388
01389
01390
01391
01392
01393
01394 if (!(type == MAX_HORZ && orig_max != MAX_FULL ||
01395 type == MAX_VERT && orig_max == MAX_FULL ||
01396 type == MAX_NONE && !(orig_max & MAX_VERT) ||
01397 type == MAX_FULL && orig_max == MAX_VERT)) {
01398
01399 if (orig_max & MAX_VERT) {
01400 new_y = m_old_pos_y;
01401 new_h = m_old_height;
01402 } else {
01403 m_old_pos_y = new_y;
01404 m_old_height = new_h;
01405 new_y = screen().maxTop(head);
01406 new_h = screen().maxBottom(head) - new_y - 2*frame().window().borderWidth();
01407 }
01408 maximized ^= MAX_VERT;
01409 }
01410
01411
01412 if (!(type == MAX_VERT && orig_max != MAX_FULL ||
01413 type == MAX_HORZ && orig_max == MAX_FULL ||
01414 type == MAX_NONE && !(orig_max & MAX_HORZ) ||
01415 type == MAX_FULL && orig_max == MAX_HORZ)) {
01416
01417 if (orig_max & MAX_HORZ) {
01418 new_x = m_old_pos_x;
01419 new_w = m_old_width;
01420 } else {
01421
01422 m_old_pos_x = new_x;
01423 m_old_width = new_w;
01424 new_x = screen().maxLeft(head);
01425 new_w = screen().maxRight(head) - new_x - 2*frame().window().borderWidth();
01426 }
01427 maximized ^= MAX_HORZ;
01428 }
01429
01430 moveResize(new_x, new_y, new_w, new_h);
01431
01432 }
|
| void FluxboxWindow::maximizeFull |
( |
|
) |
|
|
| void FluxboxWindow::maximizeHorizontal |
( |
|
) |
|
|
| void FluxboxWindow::maximizeVertical |
( |
|
) |
|
|
| void FluxboxWindow::popupMenu |
( |
|
) |
|
|
| void FluxboxWindow::restoreAttributes |
( |
|
) |
|
|
|
|
Sets the attributes to what they should be but doesn't change the actual state (so the caller can set defaults etc as well)
! TODO check value?
Definition at line 1823 of file Window.cc.
References FbAtoms::getFluxboxAttributesAtom(), MAX_FULL, MAX_HORZ, MAX_NONE, MAX_VERT, and FbTk::FbWindow::property().
01823 {
01824 if (!getState())
01825 m_current_state = NormalState;
01826
01827 Atom atom_return;
01828 int foo;
01829 unsigned long ulfoo, nitems;
01830 FbAtoms *fbatoms = FbAtoms::instance();
01831
01832 BlackboxAttributes *net;
01833 if (m_client->property(fbatoms->getFluxboxAttributesAtom(), 0l,
01834 PropBlackboxAttributesElements, false,
01835 fbatoms->getFluxboxAttributesAtom(), &atom_return, &foo,
01836 &nitems, &ulfoo, (unsigned char **) &net) &&
01837 net) {
01838 if (nitems != (unsigned)PropBlackboxAttributesElements) {
01839 XFree(net);
01840 return;
01841 }
01842 m_blackbox_attrib.flags = net->flags;
01843 m_blackbox_attrib.attrib = net->attrib;
01844 m_blackbox_attrib.workspace = net->workspace;
01845 m_blackbox_attrib.stack = net->stack;
01846 m_blackbox_attrib.premax_x = net->premax_x;
01847 m_blackbox_attrib.premax_y = net->premax_y;
01848 m_blackbox_attrib.premax_w = net->premax_w;
01849 m_blackbox_attrib.premax_h = net->premax_h;
01850
01851 XFree(static_cast<void *>(net));
01852 } else
01853 return;
01854
01855 if (m_blackbox_attrib.flags & ATTRIB_SHADED &&
01856 m_blackbox_attrib.attrib & ATTRIB_SHADED) {
01857 int save_state =
01858 ((m_current_state == IconicState) ? NormalState : m_current_state);
01859
01860 shaded = true;
01861
01862 m_current_state = save_state;
01863 }
01864
01865 if (( m_blackbox_attrib.workspace != screen().currentWorkspaceID()) &&
01866 ( m_blackbox_attrib.workspace < screen().getCount())) {
01867 m_workspace_number = m_blackbox_attrib.workspace;
01868
01869 if (m_current_state == NormalState) m_current_state = WithdrawnState;
01870 } else if (m_current_state == WithdrawnState)
01871 m_current_state = NormalState;
01872
01873 if (m_blackbox_attrib.flags & ATTRIB_OMNIPRESENT &&
01874 m_blackbox_attrib.attrib & ATTRIB_OMNIPRESENT) {
01875 stuck = true;
01876
01877 m_current_state = NormalState;
01878 }
01879
01880 if (m_blackbox_attrib.flags & ATTRIB_STACK) {
01882 m_layernum = m_blackbox_attrib.stack;
01883 }
01884
01885 if ((m_blackbox_attrib.flags & ATTRIB_MAXHORIZ) ||
01886 (m_blackbox_attrib.flags & ATTRIB_MAXVERT)) {
01887 int x = m_blackbox_attrib.premax_x, y = m_blackbox_attrib.premax_y;
01888 unsigned int w = m_blackbox_attrib.premax_w, h = m_blackbox_attrib.premax_h;
01889 maximized = MAX_NONE;
01890 if ((m_blackbox_attrib.flags & ATTRIB_MAXHORIZ) &&
01891 (m_blackbox_attrib.flags & ATTRIB_MAXVERT))
01892 maximized = MAX_FULL;
01893 else if (m_blackbox_attrib.flags & ATTRIB_MAXVERT)
01894 maximized = MAX_VERT;
01895 else if (m_blackbox_attrib.flags & ATTRIB_MAXHORIZ)
01896 maximized = MAX_HORZ;
01897
01898 m_blackbox_attrib.premax_x = x;
01899 m_blackbox_attrib.premax_y = y;
01900 m_blackbox_attrib.premax_w = w;
01901 m_blackbox_attrib.premax_h = h;
01902 }
01903
01904 setState(m_current_state);
01905 }
|
| void FluxboxWindow::showMenu |
( |
int |
menu_x, |
|
|
int |
menu_y |
|
) |
|
|
| void FluxboxWindow::unmapNotifyEvent |
( |
XUnmapEvent & |
ue |
) |
|
|
|
|
Unmaps frame window and client window if event.window == m_client->window Returns true if *this should die else false
Definition at line 2104 of file Window.cc.
References findClient(), WinClient::title(), and FbTk::FbWindow::window().
02104 {
02105 WinClient *client = findClient(ue.window);
02106 if (client == 0)
02107 return;
02108
02109 #ifdef DEBUG
02110 cerr<<__FILE__<<"("<<__FUNCTION__<<"): 0x"<<hex<<client->window()<<dec<<endl;
02111 cerr<<__FILE__<<"("<<__FUNCTION__<<"): title="<<client->title()<<endl;
02112 #endif // DEBUG
02113
02114 restore(client, false);
02115
02116 }
|
| void FluxboxWindow::withdraw |
( |
|
) |
|
|
|
|
set the window in withdrawn state
Set window in withdrawn state
Definition at line 1343 of file Window.cc.
References FbTk::Menu::hide(), and FbWinFrame::hide().
01343 {
01344 iconic = false;
01345
01346 if (isResizing())
01347 stopResizing();
01348
01349 frame().hide();
01350
01351 m_windowmenu.hide();
01352 }
|
The documentation for this class was generated from the following files:
Fluxbox CVS-Jan-2003
|
|
|