]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #1451 from acrisci/feature/handle-button-release
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Wed, 11 Feb 2015 19:13:00 +0000 (20:13 +0100)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Wed, 11 Feb 2015 19:13:00 +0000 (20:13 +0100)
Handle button release events

CONTRIBUTING.md [new file with mode: 0644]
docs/debugging
docs/hacking-howto
i3bar/src/ipc.c
include/libi3.h
libi3/font.c

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..8fff92b
--- /dev/null
@@ -0,0 +1,19 @@
+# i3status/i3lock bugreports/feature requests
+
+Note that i3status and i3lock related bugreports and feature requests should be
+filed in the corresponding repositories, i.e. https://github.com/i3/i3status
+and https://github.com/i3/i3lock
+
+# i3 bugreports/feature requests
+
+1. Read http://i3wm.org/docs/debugging.html
+2. Make sure you include a link to your logfile in your report (section 3).
+3. Make sure you include the i3 version number in your report (section 1).
+
+# Pull requests
+
+* Before sending a pull request for new features, please check with us that the
+  feature is something we want to see in i3 by opening an issue which has
+  “feature request” or “enhancement” in its title.
+* Use `clang-format` to format your code.
+* Run the testsuite, see http://i3wm.org/docs/testsuite.html
index 9dec3056ec0643b7b8b0c0eb32a0d0bd35037ded..1253b0c50fc2b405f8279d36211c7c02014174fd 100644 (file)
@@ -72,15 +72,17 @@ i3-msg 'debuglog on; shmlog on; reload'
 No matter whether i3 misbehaved in some way without crashing or whether it just
 crashed, the logfile provides all information necessary to debug the problem.
 
-To save a compressed version of the logfile (suitable for attaching it to a
-bugreport), use:
---------------------------------------------------------------------
-DISPLAY=:0 i3-dump-log | bzip2 -c > /tmp/i3.log.bz2
---------------------------------------------------------------------
+To upload a compressed version of the logfile (for a bugreport), use:
+------------------------------------------------------------------------------
+DISPLAY=:0 i3-dump-log | bzip2 -c | curl --data-binary @- http://logs.i3wm.org
+------------------------------------------------------------------------------
 
 This command does not depend on i3 (it also works while i3 displays
 the crash dialog), but it requires a working X11 connection.
 
+After running it, you will get a URL to the logfile. Please include that URL in
+your bug report.
+
 == On crashes: Obtaining a backtrace
 
 When i3 crashes, it will display a dialog stating “i3 just crashed”, offering
index aca6e92bf6f496bbc5272169ab279b557232c0e9..a591047ede3986f6235d1e9ba301292902c9932a 100644 (file)
@@ -951,17 +951,15 @@ For a short introduction into using git, see
 http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy
 or, for more documentation, see http://git-scm.com/documentation
 
-You can view the git repository online at http://code.i3wm.org.
-
 Please talk to us before working on new features to see whether they will be
 accepted. There are a few things which we don’t want to see in i3, e.g. a
 command which will focus windows in an alt+tab like way.
 
 When working on bugfixes, please make sure you mention that you are working on
-it in the corresponding bugreport at http://bugs.i3wm.org/. In case there is no
-bugreport yet, please create one.
+it in the corresponding bugreport at https://github.com/i3/i3/issues In case
+there is no bugreport yet, please create one.
 
-After you are done, please submit your work for review at http://cr.i3wm.org/
+After you are done, please submit your work for review at https://github.com/i3/i3
 
 Do not send emails to the mailing list or any author directly, and don’t submit
 them in the bugtracker, since all reviews should be done in public at
index 3eb50beb34bb817c231947f70b64f091d1e4b3d6..e1b343e5d699a9216f561a2dfc8b38cf43561945 100644 (file)
@@ -159,6 +159,9 @@ void got_bar_config_update(char *event) {
     if (found_id == NULL)
         return;
 
+    /* reconfigure the bar based on the current outputs */
+    i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_OUTPUTS, NULL);
+
     free_colors(&(config.colors));
 
     /* update the configuration with the received settings */
@@ -169,6 +172,8 @@ void got_bar_config_update(char *event) {
         reconfig_windows(true);
     }
 
+    /* update fonts and colors */
+    init_xcb_late(config.fontname);
     init_colors(&(config.colors));
     realloc_sl_buffer();
 
index 7c0ead32be1df03170396c11ba09e606aefe3f2e..7a2bdf581c6bae07a32715b11977a283a7d1f8ae 100644 (file)
@@ -290,7 +290,8 @@ uint32_t get_mod_mask_for(uint32_t keysym,
 
 /**
  * Loads a font for usage, also getting its height. If fallback is true,
- * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting.
+ * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting. If any
+ * font was previously loaded, it will be freed.
  *
  */
 i3Font load_font(const char *pattern, const bool fallback);
@@ -302,7 +303,8 @@ i3Font load_font(const char *pattern, const bool fallback);
 void set_font(i3Font *font);
 
 /**
- * Frees the resources taken by the current font.
+ * Frees the resources taken by the current font. If no font was previously
+ * loaded, it simply returns.
  *
  */
 void free_font(void);
index 7670335fa805fb62f0869fae3b181c000d8a287d..a338f9752cc29714c5c357e63323de786aa62f3f 100644 (file)
@@ -160,10 +160,14 @@ static int predict_text_width_pango(const char *text, size_t text_len) {
 
 /*
  * Loads a font for usage, also getting its metrics. If fallback is true,
- * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting.
+ * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting. If any
+ * font was previously loaded, it will be freed.
  *
  */
 i3Font load_font(const char *pattern, const bool fallback) {
+    /* if any font was previously loaded, free it now */
+    free_font();
+
     i3Font font;
     font.type = FONT_TYPE_NONE;
 
@@ -257,10 +261,15 @@ void set_font(i3Font *font) {
 }
 
 /*
- * Frees the resources taken by the current font.
+ * Frees the resources taken by the current font. If no font was previously
+ * loaded, it simply returns.
  *
  */
 void free_font(void) {
+    /* if there is no saved font, simply return */
+    if (savedFont == NULL)
+        return;
+
     free(savedFont->pattern);
     switch (savedFont->type) {
         case FONT_TYPE_NONE:
@@ -283,6 +292,8 @@ void free_font(void) {
             assert(false);
             break;
     }
+
+    savedFont = NULL;
 }
 
 /*