1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00
Commit Graph

2477 Commits

Author SHA1 Message Date
Daniel Déchelotte
cf5fdca63d WPrefs: adds possibility to disable drawers from Docks panel 2013-04-12 02:14:10 +01:00
Daniel Déchelotte
e14e6b3da8 Add drawers to wmaker!
Drawers are horizontal docks, and they can themselves only live in the dock

To use them, right click on the dock or a docked appicon and select "Add
a drawer". Then move appicons into the drawer (drag them with the
mouse). You may change the icon of the drawer. By default, drawers
auto-expand and -collapse, and auto-raise/lower. This can be customized
in the same way as for the clip.

Set DisableDrawers to YES in G/D/WindowMaker if you do not want to see
the menu entry to add a drawer.

Just discovered this bug: the auto-attract icon functionality will not
work (to be precise, it crashes WM!) if the clip is disabled
(NoClip=YES). Will fix shortly, of course.
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
707ce34a5e Added a SlideWindows function to handle horizontally-aligned array of windows
The existing SlideWindow() function is changed to call SlideWindows() with an array of 1 window
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
95a73e2783 Added wDefaultPurgeInfo to remove what we stored about a given instance-class couple.
This function is not used for now, but will be for drawers
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
9fae35fbc4 Merging appicon.c:appIconMouseDown and dock.c:handleIconMove into appicon.c:wHandleAppIconMove
Behaves essentially the same, only a bit more consistently.
Known differences:
1. An AppIcon will now always end up undocked if moved while Mod1 is pressed.
2. Moving a docked AppIcon with Mod1 pressed (undocking it) used to auto-expand the clip,
   as clip expansion happened first, while looking for a snapping position,
   and the test on Mod1 being pressed happened only later
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
8b6ff01d39 Move code that removes icons from a dock to new removeIcons function
Code taken from removeIconsCallback.
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
f93f847b33 Bring back some "About" information when double-clicking the dock
When dock is double-clicked and no application is defined to be launched, show
the information panel (instead of doing nothing).
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
525ab89d01 Increase MAX_WINDOWLIST_WIDTH from 160 to 400 (in pixels) 2013-04-12 02:14:10 +01:00
Daniel Déchelotte
5a6e1653ac WPrefs: new Docks pannel, to change auto-expand/collapse/etc delays 2013-04-12 02:14:10 +01:00
Daniel Déchelotte
d24cbc79ee Make the clip's auto-delays configurable
The options are ClipAutoraiseDelay, ClipAutolowerDelay, ClipAutoexpandDelay, ClipAutocollapseDelay

The default values are weird but merely represent the previously
hard-coded ones. They are repeated in Defaults/WindowMaker to avoid a
WPrefs crash (but it's a good idea to make them "visible", too)

WPrefs change coming up
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
6f44be87fc Consolidated all code checking whether a tile is fully on screen in one static function
The function existed before, but had all kinds of unneeded arguments and wasn't called everywhere.
2013-04-12 02:14:09 +01:00
Daniel Déchelotte
4b44020488 WPrefs: consolidate the 2 createImages static functions into a global one 2013-04-12 02:14:09 +01:00
Daniel Déchelotte
9548c42b71 Fix leading spaces in comment (trivial) 2013-04-12 02:14:09 +01:00
Daniel Déchelotte
cc02023e3e BF for "some obscured windows briefly appears when switching workspaces"
When changing workspace, mapped windows are unmapped from top to bottom
(referring to their stacking order), causing mapped but obscured windows
to briefly appear when the obscuring window is unmapped and until they
are themselves unmapped. [This might not be visible on recent hardware].
The fix is to unmap windows in reverse stacking order when changing
workspace.
2013-04-12 02:14:09 +01:00
Daniel Déchelotte
be95172c95 Avoid clip flickering when docking an appicon
In handleIconMove, when moving an appicon near the clip, all clips were
systematically shown each time the mouse moved, causing some flickering
(perhaps only perceptible on a low-end machine?). This patch introduces
a showed_all_clips boolean to expand clips only once.
2013-04-12 02:14:09 +01:00
Daniel Déchelotte
dfe7e255b2 Deleted useless test
If btn->omnipresent, then btn->dock is precisely
scr->workspaces[scr->current_workspace]->clip (cf.
wWorkspaceForceChange() calling wClipUpdateForWorkspaceChange())
2013-04-12 02:14:09 +01:00
Rodolfo García Peñas (kix)
4222204abc Workspace clip creation in two steps
This patch assigns always the clip to NULL and only if the clip is
needed is created.

This patch mainly is more clear/clean.
2013-03-21 10:02:43 +00:00
Rodolfo García Peñas (kix)
25d083a85f Removed extra XClearWindow call
The function XClearWindow() is called twice, we can remove one.
See the asterisks (**):

Before the call to wIconPaint():
-----------------8<--------------------------
+++ b/src/icon.c
@@ -621,7 +621,6 @@ void update_icon_pixmap(WIcon *icon)
                XSetWindowBackgroundPixmap(dpy, icon->core->window, icon->pixmap);

        /* Paint it */
**      XClearWindow(dpy, icon->core->window);
        wIconPaint(icon);
 }
-----------------8<--------------------------

First call in wIconPaint() function:
-----------------8<--------------------------
void wIconPaint(WIcon *icon)
{
        WScreen *scr = icon->core->screen_ptr;
        int x, l, w;
        char *tmp;

**      XClearWindow(dpy, icon->core->window);
-----------------8<--------------------------
2013-03-21 10:01:04 +00:00
Rodolfo García Peñas (kix)
bb48c35522 Window attributes moved to wCoreCreateTopLevel
The function wCoreCreateTopLevel() is used in two files (icon.c and
framewin.c), but after create the window, some attributes are changed.

This patch moves the change inside the wCoreCreateTopLevel(), avoiding to
call XChangeWindowAttributes() after the window creation. Now the window
is created in only one step, with all the final attributes.

Some details:

- The function wCoreCreateTopLevel() has now one argument more, the
  border pixel color. This attribute was used always as the screen
  frame_border_pixel, but in icon.c the attribute is changed to
  white_pixel. Now the function wCoreCreateTopLevel() receives the
  value frame_border_pixel in framewin.c and scr->white_pixel in
  icon.c, as argument.

- The vmask and attribs variables and the call to XChangeWindowAttributes()
  are removed in framewin.c and icon.c. The values CWSaveUnder for vmask and
  attribs.save_under = True are used if wPreferences.use_saveunders is True.

- CWBorderPixel is not needed in icon.c, because was previously set in wcore.c!
2013-03-21 10:01:04 +00:00
Rodolfo García Peñas (kix)
42a4d95e5b Removed unused dock types
The dock types NORMAL_DOCK and EXTENDED_DOCK are never used
so can be removed.

kix@debian:~/src/wmaker/git/wmaker-crm-base$ rgrep NORMAL_DOCK *
src/dock.h:#define NORMAL_DOCK    WM_DOCK
kix@debian:~/src/wmaker/git/wmaker-crm-base$ rgrep EXTENDED_DOCK *
src/dock.h:#define EXTENDED_DOCK  WM_CLIP
kix@debian:~/src/wmaker/git/wmaker-crm-base$
2013-03-21 10:01:04 +00:00
Rodolfo García Peñas (kix)
309d5c0d1a Cosmetic code changes in workspace
Added some blank lines, removed commented code and removed some
spaces on function prototypes/definitions.
2013-03-21 10:01:04 +00:00
Rodolfo García Peñas (kix)
53d31c7bbd Removed dead code in wSessionRestoreState
The function wSessionRestoreState() calls execCommand()
with the argument "host", but this argument is never used,
so we can remove the argument and the code to make that
argument, dead code at wSessionRestoreState.
2013-03-21 09:44:16 +00:00
Andreas Bierfert
066de301df Teach WPrefs about OPEN_PLMENU
From 35f19d77874d1b50de5505b6b1cb31531e1c055a Mon Sep 17 00:00:00 2001
From: Andreas Bierfert <andreas.bierfert@lowlatency.de>
Date: Thu, 31 Jan 2013 22:35:42 +0100
Subject: [PATCH 3/3] Teach WPrefs about OPEN_PLMENU

Add option to WPrefs to read, add and edit OPEN_PLMENU menu entries
2013-02-10 11:26:33 +00:00
Andreas Bierfert
c21ae6b580 Add OPEN_PLMENU option to parse command generated proplist style menus
This patch adds the OPEN_PLMENU options which behaves similar to OPEN_MENU but
can be used to parse command generated proplists. This can be used e.g. in
conjunction with wmmenugen like:
(
    "Generated PL Submenu",
    OPEN_PLMENU,
    "|| find /usr/share/applications -type f -name '*desktop' | xargs
wmmenugen -parser:xdg"
)

v2: code cleanup
2013-02-10 11:24:47 +00:00
Andreas Bierfert
cc69d2aae3 WINGS: New function WMReadPropListFromPipe
This functions reads a proplist from a pipe instead of a file (like
WMReadPropListFromFile does). It uses a call to popen to open the desired
command, reads data into a buffer till EOF and passes the data to getPropList
for parsing.

v2: code cleanup
2013-02-10 11:22:54 +00:00
BALATON Zoltan
a657fafcce WPrefs: Fix single click activation button in Icon preferences
Forgot to connect the button to the corresponding defaults key so it
was not working properly.
2013-02-08 17:55:54 +00:00
Carlos R. Mafra
a23e42639a wmgenmenu: Add XBMC entry 2013-01-31 01:00:42 +00:00
Rodolfo García Peñas (kix)
fd7b117346 Sanitize 'Ignore client supplied icon' logic
There can be these 4 situations:

1. ignore flag + file set
2. no ignore flag + file set
3. ignore flag + no file set
4. no ignore flag + no file set

If the "ignore client supplied icon flag" is not set it means the user wants to use the client-provided icon,
so the eventual file name which might be in the entry field is ignored.

If the user sets the ignore flag and sets the icon name all is fine and Option 1 is done.

If the user tries to set an icon (ignore flag is set) but the file textbox is not set we show the
warning:

"Ignore client supplied icon is set, but icon filename textbox is empty. Using client supplied icon"

and use the client-supplied icon instead.
2013-01-26 18:19:01 +00:00
Wade Berrier
ada7161d8d autoconf: add remaining parameter for AC_SEARCH_LIBS
According to:

http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Libraries.html

Found this while trying to compile for RHEL6.  Otherwise, configure
failed.
2013-01-26 09:50:28 +00:00
Rodolfo García Peñas (kix)
70c9208e40 Simplify the application appicon creation
This patch removes all the appicon stuff from the application creation
to the appicon creation. Now, the application only calls one function
(create_appicon_for_application()) and this function do all the work.

The function do the same code than the code before this patch, but the
only change is that the "if" test to check if the appicon was found in
the docks now is negated, removing the return and doing the appicon_save
inside the function.

Finally, the old makeAppIconFor is now create_appicon_for_application().
2013-01-22 21:46:39 +00:00
Rodolfo García Peñas (kix)
97d7c32184 New function set_icon_image_from_database
The new function set_icon_image_from_database() removes the dup code
from these functions:

icon.c:icon_create_for_dock()
icon.c:icon_create_for_wwindow()
appicon.c:removeAppIconFor()

The only different change is that in the functions icon_create_for_dock()
and icon_create_for_wwindow(), the icon->tile_type assignment is done
before set the icon image filename and icon image, but this variable
is not used in these functions (is used in wIconUpdate function) but in both
functions the icon->tile_type assignment is done before wIconUpdate(), like
the code previous to this patch, so there is no problem moving icon->tile_type.
2013-01-22 21:46:39 +00:00
Rodolfo García Peñas (kix)
d7fe9a5bcd Update docked icon after kill dockapp
This patch sets the correct icon after kill a docked application.
To reproduce the problem (as Carlos reported to me), follow these
steps:

1. With a docked application, not running, set the icon image.
2. Launch the docked application.
3. Kill the application, using for example the app dock menu.

The icon is lost. But if wmaker is restarted, the icon backs again.

The problem is because when the application is closed, the function
removeAppIconFor() calls wIconUpdate(), but this function doesn't
find the icon in the file system again. The icon is loaded from the
filesystem only when the application is created.

This patch creates the icon image again, then calls wIconUpdate() to
set the icon image or the default icon image if the icon image was
not found, then wPaint it.

These lines comes from the create_appicon_from_* functions, used
to set the icon image for docks and applications. Are copy/pasted.
2013-01-22 21:46:39 +00:00
Carlos R. Mafra
74aa65abeb Window placement: Enforce center position
When the "Center" choice for window position is chosen, really enforce
the center position for all windows, instead of falling back to "Auto"
when there are already windows on the workspace.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2013-01-22 11:55:06 +00:00
Rodolfo García Peñas (kix)
b9caaa8729 WINGs: New function W_setconf_doubleClickDelay
The new function W_setconf_doubleClickDelay() sets the value for
WPreferences.W_setconf_doubleClickDelay(), therefore the private
data of WPreferences struct is not used.

This call is used at defaults.c to set the doubleClickDelay().
2013-01-12 14:45:29 +00:00
Rodolfo García Peñas (kix)
73d75fa848 Don't access to private WINGs info
From the BALATON Zoltan comment:

If the P in WINGsP.h stands for Private then no files outside of WINGs
should include it. If WINGsConfiguration is an internal structure of
WINGs then only accessor methods should be used outside of WINGs.

This patch uses the new functions to read the WINGs configuration, not
using the internal library data.
2013-01-12 14:45:29 +00:00
Rodolfo García Peñas (kix)
cba94da2cf WINGs: Functions to read the Mouse Wheel conf
These new functions:

unsigned W_getconf_mouseWheelUp(void);
unsigned W_getconf_mouseWheelDown(void);

returns the WINGs configuration for the Mouse Wheel Up and Down
values.
2013-01-12 14:45:29 +00:00
Rodolfo García Peñas (kix)
68208a01a0 New shutdown.h file
The new shutdown.h file includes the shutdown modes and the functions
to shutdown Window Maker.

The function definitios were moved from funcs.h and the struct WShutdownMode
from WindowMaker.h.

Now, externs are not needed, only include shutdown.h
2013-01-12 14:37:31 +00:00
Rodolfo García Peñas (kix)
b71f2c30fd Removed XRANDR externs
This patch moves the XRANDR variable definitions to screen.h, because
xrandr is related to screen behavior. Then, the definition externs
can be removed.

This patch also changes (in event.c) the ConfigureNotify event processing
to avoid call the "if" block if XRANDR is not enabled. I chose the option of
move the if into the HAVE_XRANDR block instead of include the
ConfigureNotify case inside of the HAVE_XRANDR block (proposed by
BALATON Zoltan) to avoid call the default option if not needed.
2013-01-12 13:10:29 +00:00
SJS
c058af6d35 README capitalization fix
Typo fix in the README.
2013-01-08 21:07:53 +00:00
Andreas Bierfert
0b74ae4194 Include LGPL with correct FSF address
(see http://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt)
2013-01-07 21:19:56 +00:00
Andreas Bierfert
085224973a Fix incorrect FSF address 2013-01-07 21:19:40 +00:00
Carlos R. Mafra
3b8c36510f Set mod+wheel to OFF by default
Resizing windows with the mouse wheel was introduced in a063338175
("Mod+Wheel Window Resize") and it should be disabled by default
in order to not confuse users.

Users wanting this behavior can enable it through WPrefs.

Bug report: https://bugs.launchpad.net/ubuntu/+source/wmaker/+bug/1082879
2013-01-06 23:27:44 +00:00
Kamil Rytarowski
37677b2ec0 Fix underlinking
libWMaker (wmlib) requires -lX11.
2013-01-05 11:50:51 +00:00
Carlos R. Mafra
a2de2c34ee Window Maker 0.95.4 wmaker-0.95.4 2013-01-03 23:29:16 +00:00
Kamil Rytarowski
0706471a10 Fix build with automake-1.13 and modernize .am files.
The following macro: AM_CONFIG_HEADER is deprecated and replaced with AC_CONFIG_HEADERS. INCLUDES is an old version of AM_CPPLAGS.
2013-01-03 23:27:31 +00:00
Rodolfo García Peñas (kix)
0d441c3b98 Debian changes for final 0.95.4
These are the final changes for the new version 0.95.4. The main change
is set right the symbols for the new version, that include:

- Changes in debian/libwutil2.symbols from the git version to 0.95.4
- Changes in debian/changelog about the comments for the new version

On the other hand, the new debug schema is using hashes, therefore
the /usr/lib/debug/wmaker folder not longer exists. The new folder
is /usr/lib/debug/.build-id. This folder is auto-created and then
we don't need create it in debian/wmaker-dbg.dirs. Therefore, the file
debian/wmaker-dbg.dirs is empty and can be removed.

Finally, a little comment about folder in debian/README.Debian.
2013-01-03 22:16:33 +00:00
Carlos R. Mafra
18437e0309 WINGs: Enable cursor blinking in text fields
This code was commented out but enabling it leads to no issues AFAICS
and improves the usability of WINGs applications.

The motivation for this patch comes from the need of distinguishing
where the cursor is in the WINGs-based application which handles the
database of my comics collection.

This changes the behavior in all parts of wmaker where there is
a text field entry, e.g. in the settings panel of dockapps. There should
be no issues with a blinking cursor in such cases though...
2012-12-22 20:15:47 +00:00
Carlos R. Mafra
3d47016788 Revert "Maximized windows appear misplaced"
This reverts commit b657f15344.
2012-12-18 18:29:50 +00:00
Carlos R. Mafra
b02a12b8c1 Revert "Prevent windows from drifting on restart."
This reverts commit 3cd382bccc.

Conflicts:
	src/window.c
2012-12-18 18:29:11 +00:00
Carlos R. Mafra
f6f72acbde Revert "Fixed regression when placing windows."
This reverts commit 4e193c172b.

Conflicts:
	src/window.c
2012-12-18 18:20:52 +00:00