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

2961 Commits

Author SHA1 Message Date
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
Carlos R. Mafra
ff52ef3996 Revert "Prevent border drifting."
This reverts commit df601267e6.

Conflicts:
	src/window.c
2012-12-18 18:18:14 +00:00
Rodolfo García Peñas (kix)
0a461416e3 Avoid icon change to default on winspector save
For a icon, the icon image is stored in icon->file_image. If we repaint
the image, we we don't need search the icon again. We can continue using
icon->file_image.

Indeed, if launch the "window inspector" window (winspector), using a
saved icon and "ignore client icon" set, then the database holds the
name of the icon to draw on the screen. If we remove the icon info in
the winspector (removing the file name or un-setting the "ignore client
icon" flag, then the database losts the icon name and then the function
wDefaultUpdateIcons() cannot find the icon to draw for the icon.

In winspector, with this patch, the previous image set by "ApplySettings"
and stored at icon->file_image is used.
2012-11-29 09:37:42 +00:00
Rodolfo García Peñas (kix)
c164db31bf winspector: Save iconpath if icon will be used
This patch avoids to save the icon name in the configuration file
if the flag "Ignore client supplied icon" is not selected.

First, when winspector tries to show the icon to the user, it must not search
the default icon. It should use the specific icon or the icon provided
by the client.

When we click in "save Settings", the function saveSettings reads the icon
specified by the user in the text box. If the checkbox "Ignore client supplied
icon" is not selected, then saves the icon too.

Using this behaviour we never recover the initial position (no icon selected,
no ignore client supplied icon flag set). This patch recovers the initial
state of the icon options.

When the user unsets the ignore client the filename provided is not saved in
the configuration file. Now, the configuration is like the initial status.
If the user checks the flag and set the file to use as icon, the file is used.
2012-11-29 09:35:51 +00:00
Rodolfo García Peñas (kix)
e206f471fe winspector: Don't use text input if NULL
This patch don't use the text input for the file if is empty.
The function should use the function to get the icon provided
by the client.
2012-11-29 09:30:25 +00:00
Rodolfo García Peñas (kix)
99e5a7a9eb winspector.c: Full clean patch
This patch sets a correct style on winspector.c. It removes some
empty lines, moves variable definitions to the function heads,
moves preprocessor definitions to the top of the file and removes
some extra curly brackets.

The function to create the winspector panel is so big, and is hard
to understand it. This patch split the function createInspectorForWindow
in some extra functions:

create_tab_window_attributes
create_tab_window_advanced
create_tab_icon_workspace
create_tab_app_specific

This functions don't do nothing extra, only the code is moved to them.
2012-11-29 09:27:30 +00:00
Rodolfo García Peñas (kix)
bf2f942138 Avoid crash on icon move without command
This patch avoid a crash when moving an icon without command.
To reproduce the problem:

1. Launch an application, for example xeyes, with appicon.
2. Move the appicon to the clip.
3. Close the application.
4. Edit the appicon in the clip, and empty the commands fields.
5. Move the appicon from the clip to the dock. -> Crash.

The crash happends because icon->icon->owner is NULL and then
wwin will be NULL. Then the call of wwin->client_win will crash.

This patch checks if icon->icon->owner is not null (application is
running) and then assign it to wwin. Then get the command from the
running application.
2012-11-28 00:12:59 +01:00
Martin Frydl
914d4e06ef Added option to ignore minimized windows during cycling.
Added CycleIgnoreMinimized configuration option settable on Expert page in WPrefs.
When option is set, switch panel cycling ignores minimized (grayed) windows. They
are still visible and can be selected using left/right arrows or mouse click.
2012-11-28 00:07:13 +01:00
Amadeusz Sławiński
eae7ef6c59 Fix Maximize/Unmaximize in window menu
Add variable to track window startup size and use it when checking for changes
2012-11-24 11:07:32 +01:00
John H. Robinson, IV
ea7ef65b19 Makefile: Add forgotten .h files
Please find attached a diff to add the missing .h files from src/Makefile.am

One way to find these:
$ git checkout next
$ ./autogen.sh
$ ./configure
$ make dist-gzip
$ tar xzf WindowMaker-0.95.3.tar.gz
$ cd WindowMaker-0.95.3
$ ./configure
$ make
2012-11-19 23:57:46 +01:00
Rodolfo García Peñas (kix)
e393c6b61a stacking.h removed white lines
The white lines in stacking.h were removed.
2012-11-19 00:12:46 +01:00
Rodolfo García Peñas (kix)
db6605932b window.c clean code 1
This patch only make some code style clean.
2012-11-18 23:40:13 +01:00
Rodolfo García Peñas (kix)
4111f336d0 create_stdcmap is never used
The create_stdcmap variable is never set, so can be removed.

This patch don't update the translation .po files!
2012-11-18 23:40:12 +01:00
Christophe CURIS
8b6e96ab74 Moved parameters of WPrefs's expert check-buttons to a single place
The list of options in the Expert tab of WPrefs.app was filled using
hard-coded list of commands with static indexes and the related
usage were spread accross procedures. This was dangerous because
it could lead to mismatched indexes, the list length being also
variable, so it was hard to update.

This patch proposes to group all the options in a single place (a
static const array), so it is easy to add/remove/reorder the options,
and the code just parses this array based on its auto-calculated
size.
2012-11-18 17:23:20 +01:00
Rodolfo García Peñas (kix)
2165faec5d applySettings icon set updated
The function applySettings() set now the icons. Updated icons are:

- Appicon: Always, with or without always_user_icon
- Window: If the window is minimized, with or without always_user_icon.
  Window must be minimized to see the icon change, else, wwin->icon
  doesn't exist and therefore you won't see this change (no icon).

There is a problem if the window is not minimized and is minimezed,
because it will show the icon in the database, not the assigned icon.
This problem must be updated not here, in the wIconifyWindow()
function, at actions.c
2012-11-17 21:10:36 +01:00
Rodolfo García Peñas (kix)
3f2c87fb06 get_rimage_icon_from_wm_hints returns image
The function get_rimage_icon_from_wm_hints now returns an image.
2012-11-17 21:10:24 +01:00
Rodolfo García Peñas (kix)
5bfac9036d wIconChangeImageFile set the file image
The function wIconChangeImageFile set the file_image variable directly,
now the code is faster and the assigned image is used.

Before this patch, the assigned file couldn't be used, because wIconUpdate
serached the icon using different methods.
2012-11-17 20:38:50 +01:00